Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

This glossary defines terms related to fixed-point data types
and numbers. These terms may appear in some or all of the documents
that describe MathWorks^{®} products that have fixed-point
support.

**arithmetic shift**Shift of the bits of a binary word for which the sign bit is recycled for each bit shift to the right. A zero is incorporated into the least significant bit of the word for each bit shift to the left. In the absence of overflows, each arithmetic shift to the right is equivalent to a division by 2, and each arithmetic shift to the left is equivalent to a multiplication by 2.

*See also*binary point, binary word, bit, logical shift, most significant bit**bias**Part of the numerical representation used to interpret a fixed-point number. Along with the slope, the bias forms the scaling of the number. Fixed-point numbers can be represented as

$$real\text{-}worldvalue=(slope\times storedinteger)+bias$$

where the slope can be expressed as

$$slope=fractionalslope\times {2}^{exponent}$$

*See also*fixed-point representation, fractional slope, integer, scaling, slope, [Slope Bias]**binary number**Value represented in a system of numbers that has two as its base and that uses 1's and 0's (bits) for its notation.

*See also*bit**binary point**Symbol in the shape of a period that separates the integer and fractional parts of a binary number. Bits to the left of the binary point are integer bits and/or sign bits, and bits to the right of the binary point are fractional bits.

*See also*binary number, bit, fraction, integer, radix point**binary point-only scaling**Scaling of a binary number that results from shifting the binary point of the number right or left, and which therefore can only occur by powers of two.

*See also*binary number, binary point, scaling**binary word**Fixed-length sequence of bits (1's and 0's). In digital hardware, numbers are stored in binary words. The way in which hardware components or software functions interpret this sequence of 1's and 0's is described by a data type.

*See also*bit, data type, word**bit**Smallest unit of information in computer software or hardware. A bit can have the value 0 or 1.

**ceiling (round toward)**Rounding mode that rounds to the closest representable number in the direction of positive infinity. This is equivalent to the

`ceil`

mode in Fixed-Point Designer™ software.*See also*convergent rounding, floor (round toward), nearest (round toward), rounding, truncation, zero (round toward)**contiguous binary point**Binary point that occurs within the word length of a data type. For example, if a data type has four bits, its contiguous binary point must be understood to occur at one of the following five positions:

$$\begin{array}{l}.0000\\ 0.000\\ 00.00\\ 000.0\\ 0000.\end{array}$$

*See also*data type, noncontiguous binary point, word length**convergent rounding**Rounding mode that rounds to the nearest allowable quantized value. Numbers that are exactly halfway between the two nearest allowable quantized values are rounded up only if the least significant bit (after rounding) would be set to

`0`

.*See also*ceiling (round toward), floor (round toward), nearest (round toward), rounding, truncation, zero (round toward)**data type**Set of characteristics that define a group of values. A fixed-point data type is defined by its word length, its fraction length, and whether it is signed or unsigned. A floating-point data type is defined by its word length and whether it is signed or unsigned.

*See also*fixed-point representation, floating-point representation, fraction length, signedness, word length**data type override**Parameter in the Fixed-Point Tool that allows you to set the output data type and scaling of fixed-point blocks on a system or subsystem level.

*See also*data type, scaling**exponent**Part of the numerical representation used to express a floating-point or fixed-point number.

1. Floating-point numbers are typically represented as

$$real-worldvalue=mantissa\times {2}^{exponent}$$

2. Fixed-point numbers can be represented as

$$real\text{-}worldvalue=(slope\times storedinteger)+bias$$

where the slope can be expressed as

$$slope=fractionalslope\times {2}^{exponent}$$

The exponent of a fixed-point number is equal to the negative of the fraction length:

$$exponent=-1\times fractionlength$$

*See also*bias, fixed-point representation, floating-point representation, fraction length, fractional slope, integer, mantissa, slope**fixed-point representation**Method for representing numerical values and data types that have a set range and precision.

1. Fixed-point numbers can be represented as

$$real\text{-}worldvalue=(slope\times storedinteger)+bias$$

where the slope can be expressed as

$$slope=fractionalslope\times {2}^{exponent}$$

The slope and the bias together represent the scaling of the fixed-point number.

2. Fixed-point data types can be defined by their word length, their fraction length, and whether they are signed or unsigned.

*See also*bias, data type, exponent, fraction length, fractional slope, integer, precision, range, scaling, slope, word length**floating-point representation**Method for representing numerical values and data types that can have changing range and precision.

1. Floating-point numbers can be represented as

$$real-worldvalue=mantissa\times {2}^{exponent}$$

2. Floating-point data types are defined by their word length.

*See also*data type, exponent, mantissa, precision, range, word length**floor (round toward)**Rounding mode that rounds to the closest representable number in the direction of negative infinity.

*See also*ceiling (round toward), convergent rounding, nearest (round toward), rounding, truncation, zero (round toward)**fraction**Part of a fixed-point number represented by the bits to the right of the binary point. The fraction represents numbers that are less than one.

*See also*binary point, bit, fixed-point representation**fraction length**Number of bits to the right of the binary point in a fixed-point representation of a number.

*See also*binary point, bit, fixed-point representation, fraction**fractional slope**Part of the numerical representation used to express a fixed-point number. Fixed-point numbers can be represented as

$$real\text{-}worldvalue=(slope\times storedinteger)+bias$$

where the slope can be expressed as

$$slope=fractionalslope\times {2}^{exponent}$$

The term

*slope adjustment*is sometimes used as a synonym for fractional slope.*See also*bias, exponent, fixed-point representation, integer, slope**full range**The broadest range available for a data type. From –∞ to ∞ for floating-point types. For integer types, the representable range is the range from the smallest to largest integer value (finite) the type can represent. For example, from

`-128`

to`127`

for a signed 8–bit integer. Also known as representable range.**guard bits**Extra bits in either a hardware register or software simulation that are added to the high end of a binary word to ensure that no information is lost in case of overflow.

*See also*binary word, bit, overflow**incorrect range**A range that is too restrictive and does not include values that can actually occur in the model element. A range that is too broad is not considered incorrect because it will not lead to overflow.

*See also*range analysis**integer**1. Part of a fixed-point number represented by the bits to the left of the binary point. The integer represents numbers that are greater than or equal to one.

2. Also called the "stored integer." The raw binary number, in which the binary point is assumed to be at the far right of the word. The integer is part of the numerical representation used to express a fixed-point number. Fixed-point numbers can be represented as

$$real-worldvalue={2}^{-fractionlength}\times storedinteger$$

or

$$real\text{-}worldvalue=(slope\times storedinteger)+bias$$

where the slope can be expressed as

$$slope=fractionalslope\times {2}^{exponent}$$

*See also*bias, fixed-point representation, fractional slope, integer, real-world value, slope**integer length**Number of bits to the left of the binary point in a fixed-point representation of a number.

*See also*binary point, bit, fixed-point representation, fraction length, integer**least significant bit (LSB)**Bit in a binary word that can represent the smallest value. The LSB is the rightmost bit in a big-endian-ordered binary word. The weight of the LSB is related to the fraction length according to

$$weightofLSB={2}^{-fractionlength}$$

*See also*big-endian, binary word, bit, most significant bit**logical shift**Shift of the bits of a binary word, for which a zero is incorporated into the most significant bit for each bit shift to the right and into the least significant bit for each bit shift to the left.

*See also*arithmetic shift, binary point, binary word, bit, most significant bit**mantissa**Part of the numerical representation used to express a floating-point number. Floating-point numbers are typically represented as

$$real-worldvalue=mantissa\times {2}^{exponent}$$

*See also*exponent, floating-point representation**model element**Entities in a model that range analysis software tracks, for example, blocks, signals, parameters, block internal data (such as accumulators, products).

*See also*range analysis**most significant bit (MSB)**Bit in a binary word that can represent the largest value. The MSB is the leftmost bit in a big-endian-ordered binary word.

*See also*binary word, bit, least significant bit**nearest (round toward)**Rounding mode that rounds to the closest representable number, with the exact midpoint rounded to the closest representable number in the direction of positive infinity. This is equivalent to the

`nearest`

mode in Fixed-Point Designer software.*See also*ceiling (round toward), convergent rounding, floor (round toward), rounding, truncation, zero (round toward)**noncontiguous binary point**Binary point that is understood to fall outside the word length of a data type. For example, the binary point for the following 4-bit word is understood to occur two bits to the right of the word length,

$$0000\underset{\xaf}{}\underset{\xaf}{}.$$

thereby giving the bits of the word the following potential values:

$${2}^{5}{2}^{4}{2}^{3}{2}^{2}\underset{\xaf}{}\underset{\xaf}{}.$$

*See also*binary point, data type, word length**one's complement representation**Representation of signed fixed-point numbers. Negating a binary number in one's complement requires a bitwise complement. That is, all 0's are flipped to 1's and all 1's are flipped to 0's. In one's complement notation there are two ways to represent zero. A binary word of all 0's represents "positive" zero, while a binary word of all 1's represents "negative" zero.

*See also*binary number, binary word, sign/magnitude representation, signed fixed-point, two's complement representation**overflow**Situation that occurs when the magnitude of a calculation result is too large for the range of the data type being used. In many cases you can choose to either saturate or wrap overflows.

*See also*saturation, wrapping**padding**Extending the least significant bit of a binary word with one or more zeros.

See also least significant bit

**precision**1. Measure of the smallest numerical interval that a fixed-point data type and scaling can represent, determined by the value of the number's least significant bit. The precision is given by the slope, or the number of fractional bits. The term

*resolution*is sometimes used as a synonym for this definition.2. Measure of the difference between a real-world numerical value and the value of its quantized representation. This is sometimes called quantization error or quantization noise.

*See also*data type, fraction, least significant bit, quantization, quantization error, range, slope**Q format**Representation used by Texas Instruments™ to encode signed two's complement fixed-point data types. This fixed-point notation takes the form

$$Qm.n$$

where

*Q*indicates that the number is in Q format.*m*is the number of bits used to designate the two's complement integer part of the number.*n*is the number of bits used to designate the two's complement fractional part of the number, or the number of bits to the right of the binary point.

In Q format notation, the most significant bit is assumed to be the sign bit.

*See also*binary point, bit, data type, fixed-point representation, fraction, integer, two's complement**quantization**Representation of a value by a data type that has too few bits to represent it exactly.

*See also*bit, data type, quantization error**quantization error**Error introduced when a value is represented by a data type that has too few bits to represent it exactly, or when a value is converted from one data type to a shorter data type. Quantization error is also called quantization noise.

*See also*bit, data type, quantization**radix point**Symbol in the shape of a period that separates the integer and fractional parts of a number in any base system. Bits to the left of the radix point are integer and/or sign bits, and bits to the right of the radix point are fraction bits.

*See also*binary point, bit, fraction, integer, sign bit**range**Span of numbers that a certain data type can represent.

*See also*data type, full range, precision, representable range**range analysis**Static analysis of model to derive minimum and maximum range values for elements in the model. The software statically analyzes the ranges of the individual computations in the model based on specified design ranges, inputs, and the semantics of the calculation.

**real-world value**Stored integer value with fixed-point scaling applied. Fixed-point numbers can be represented as

$$real-worldvalue={2}^{-fractionlength}\times storedinteger$$

or

$$real\text{-}worldvalue=(slope\times storedinteger)+bias$$

where the slope can be expressed as

$$slope=fractionalslope\times {2}^{exponent}$$

*See also*integer**representable range**The broadest range available for a data type. From –∞ to ∞ for floating-point types. For integer types, the representable range is the range from the smallest to largest integer value (finite) the type can represent. For example, from

`-128`

to`127`

for a signed 8–bit integer. Also known as full range.**resolution***See***precision****rounding**Limiting the number of bits required to express a number. One or more least significant bits are dropped, resulting in a loss of precision. Rounding is necessary when a value cannot be expressed exactly by the number of bits designated to represent it.

*See also*bit, ceiling (round toward), convergent rounding, floor (round toward), least significant bit, nearest (round toward), precision, truncation, zero (round toward)**saturation**Method of handling numeric overflow that represents positive overflows as the largest positive number in the range of the data type being used, and negative overflows as the largest negative number in the range.

*See also*overflow, wrapping**scaled double**A double data type that retains fixed-point scaling information. For example, in Simulink

^{®}and Fixed-Point Designer software you can use data type override to convert your fixed-point data types to scaled doubles. You can then simulate to determine the ideal floating-point behavior of your system. After you gather that information you can turn data type override off to return to fixed-point data types, and your quantities still have their original scaling information because it was held in the scaled double data types.**scaling**1. Format used for a fixed-point number of a given word length and signedness. The slope and bias together form the scaling of a fixed-point number.

2. Changing the slope and/or bias of a fixed-point number without changing the stored integer.

*See also*bias, fixed-point representation, integer, slope**shift**Movement of the bits of a binary word either toward the most significant bit ("to the left") or toward the least significant bit ("to the right"). Shifts to the right can be either logical, where the spaces emptied at the front of the word with each shift are filled in with zeros, or arithmetic, where the word is sign extended as it is shifted to the right.

*See also*arithmetic shift, logical shift, sign extension**sign bit**Bit (or bits) in a signed binary number that indicates whether the number is positive or negative.

*See also*binary number, bit**sign extension**Addition of bits that have the value of the most significant bit to the high end of a two's complement number. Sign extension does not change the value of the binary number.

*See also*binary number, guard bits, most significant bit, two's complement representation, word**sign/magnitude representation**Representation of signed fixed-point or floating-point numbers. In sign/magnitude representation, one bit of a binary word is always the dedicated sign bit, while the remaining bits of the word encode the magnitude of the number. Negation using sign/magnitude representation consists of flipping the sign bit from 0 (positive) to 1 (negative), or from 1 to 0.

*See also*binary word, bit, fixed-point representation, floating-point representation, one's complement representation, sign bit, signed fixed-point, signedness, two's complement representation**signed fixed-point**Fixed-point number or data type that can represent both positive and negative numbers.

*See also*data type, fixed-point representation, signedness, unsigned fixed-point**signedness**The signedness of a number or data type can be signed or unsigned. Signed numbers and data types can represent both positive and negative values, whereas unsigned numbers and data types can only represent values that are greater than or equal to zero.

*See also*data type, sign bit, sign/magnitude representation, signed fixed-point, unsigned fixed-point**slope**Part of the numerical representation used to express a fixed-point number. Along with the bias, the slope forms the scaling of a fixed-point number. Fixed-point numbers can be represented as

$$real\text{-}worldvalue=(slope\times storedinteger)+bias$$

where the slope can be expressed as

$$slope=fractionalslope\times {2}^{exponent}$$

*See also*bias, fixed-point representation, fractional slope, integer, scaling, [Slope Bias]**slope adjustment***See***fractional slope****[Slope Bias]**Representation used to define the scaling of a fixed-point number.

*See also*bias, scaling, slope**stored integer***See***integer****trivial scaling**Scaling that results in the real-world value of a number being simply equal to its stored integer value:

$$real-worldvalue=storedinteger$$

In [Slope Bias] representation, fixed-point numbers can be represented as

$$real\text{-}worldvalue=(slope\times storedinteger)+bias$$

In the trivial case, slope = 1 and bias = 0.

In terms of binary point-only scaling, the binary point is to the right of the least significant bit for trivial scaling, meaning that the fraction length is zero:

$$real-worldvalue=storedinteger\times {2}^{-fractionlength}=storedinteger\times {2}^{0}$$

Scaling is always trivial for pure integers, such as

`int8`

, and also for the true floating-point types`single`

and`double`

.*See also*bias, binary point, binary point-only scaling, fixed-point representation, fraction length, integer, least significant bit, scaling, slope, [Slope Bias]**truncation**Rounding mode that drops one or more least significant bits from a number.

*See also*ceiling (round toward), convergent rounding, floor (round toward), nearest (round toward), rounding, zero (round toward)**two's complement representation**Common representation of signed fixed-point numbers. Negation using signed two's complement representation consists of a translation into one's complement followed by the binary addition of a one.

*See also*binary word, one's complement representation, sign/magnitude representation, signed fixed-point**unsigned fixed-point**Fixed-point number or data type that can only represent numbers greater than or equal to zero.

*See also*data type, fixed-point representation, signed fixed-point, signedness**word**Fixed-length sequence of binary digits (1's and 0's). In digital hardware, numbers are stored in words. The way hardware components or software functions interpret this sequence of 1's and 0's is described by a data type.

*See also*binary word, data type**word length**Number of bits in a binary word or data type.

*See also*binary word, bit, data type**wrapping**Method of handling overflow. Wrapping uses modulo arithmetic to cast a number that falls outside of the representable range the data type being used back into the representable range.

*See also*data type, overflow, range, saturation**zero (round toward)**Rounding mode that rounds to the closest representable number in the direction of zero. This is equivalent to the

`fix`

mode in Fixed-Point Designer software.*See also*ceiling (round toward), convergent rounding, floor (round toward), nearest (round toward), rounding, truncation

Was this topic helpful?