You are on page 1of 20

Floating Point & Fixed Point

Arithmetic
Contents
2’sComplement Arithmetic
Floating point Numbers
Fixed Point Numbers
Floating Point representation
Fixed Point Arithmetic
Two’s Complement Arithmetic Fixed
point processing
2’s Complement Arithmetic
Floating Point Numbers
The term floating point refers to the fact
that a number's decimal point can "float“.
that is, it can be placed anywhere relative
to the significant digits of the number.
Floating Point Numbers
Similar to scientific notation for decimal
◦ e.g. 6.02214199×1023, 1.60217653×10–19
Allow for larger range, with same relative
precision throughout the range
Fixed Point Numbers
Number that has fix number of digits before and
after the radix point.
Fixed-point numbers
◦ Allow for fractional parts
◦ Can be unsigned or signed
In decimal
10.2410  1101  0 100  2  10 1  4 10 2
Inbinary
101.012  1 2 2  0  21  1 20  0  2 1  1 22  5.2510
Represent as a bit vector: 10101
 binary point is implicit
Arithmetic
Algorithms
Fixed Point vs. Floating Point Hardware
Two’s Complement Representation
Negative Numbers
Unified Representation
Example
Two’s Complement
Four bit representation of 2’s
Complement number
Floating Point Format
IEEE Floating Point format for single
precision 32-bit Floating point number
Example: (+14.50)10
Example: Find the value of the following
32 bit binary string representing a single
precision IEEE floating point format:
0_10000010_11010000_00000000_0000000
Example
This example represents -12.25 in single
precision IEEE floating point format.
The number -12.25 in sign magnitude binary is .
Now moving the decimal point to bring it into
the right format:
Thus normalized number is

You might also like