ERRORS DUE TO TRUNCATION
AND ROUNDING
In Fixed Point Representation
Presented By
[Link]
Fixed point representation
In fixed point arithmetic the position of the binary point is [Link] bit to
the right represent the fractional part of the number and those to the left
represent the integer [Link] magnitude in which negative numbers are
represented are as mentioned below
One’s-complement form. ==>
Two's-complement form. ==>
Error due to truncation and rounding
Truncation
Truncation is a process of discarding all bits less significant than
least significant bit that is retained.
Truncation Error
If the quantization method is truncation, the number is approximated by
the nearest level that does not exceed it.
In this case the error xt - x is negative or zero where xt is truncation value
of x and it is assumed |x| <0.
If x>0;
The error made by truncating a number to b bits following the binary
point satisfies the equality for one’s complement, two’s complement and
sign magnitude representation.
If x<0;
Considering two’s complement representation, the magnitude of negative
number is
---(1)
If we truncate the number to N bit then
---(2)
Subtracting (2)-(1);
XT - X
➔ The magnitude is a positive value;
➔ So the error xT - x is negative or zero.
➔ So it satisfy the inequality
Considering one’s complement representation, the magnitude of negative
number is
---(1)
If we truncate the number to N bit then
---(2)
➔ The magnitude is a negative value;
➔ So the error xT - x is positive.
➔ So it satisfy the inequality
Its is same for sign magnitude representation
Rounding error
Rounding of a number of b bits is accomplished by choosing the rounded
the b bit number closest to the original number unrounded.
This is because with rounding, if the value lies half way between
two levels, it can be approximated to either nearest higher level or
by the nearest lower level. For fixed-point number regardless of
whether sign-magnitude, one's complement is used for negative
numbers.
Example
Qn) x=(-0.673)10 is represented by sign magnitude fixed point arithemetic . The
value is truncated to six bit . Calculate truncation error.
Ans - (0.673)10=(0.1010110….)2
(-0.673)10=(1.1010110…..)2
After truncating to 6 bits
We get xT=(1.101011)2=(-0.671875)10
Error e= xT-x=(-0.671.875)10 -(-0.673)10=0.001125