0% found this document useful (0 votes)
29 views7 pages

Fixed and Floating Point Representation

Uploaded by

iamavp1234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views7 pages

Fixed and Floating Point Representation

Uploaded by

iamavp1234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Fixed and Floating point

Representation
• In General sign bit equal to 0 for positive
and 1 for negative.
• The representation of the binary point in a
register is complicated by the fact that it is
characterized by a position in the register.
There are two ways
• fixed position
• floating-point representation.
Fixed point Representation
• The fixed-point method assumes that the
binary point is always fixed in one position.
The two positions most widely used
– a binary point in the extreme left of the
register to make the stored number a fraction
– a binary point in the extreme right of the
register to make the stored number an integer.
Integer Representation
• When an integer binary number is positive, the
sign is represented by 0 and the magnitude by a
positive binary number.
• When the number is negative, the sign is
represented by 1 but the rest of the number may
be represented in one of three possible ways:
1. Signed-magnitude representation
2. Signed-1' s complement representation
3. Signed 2' s complement representation
Ex: + 14 – 0 0001110
• Three different ways to represent - 14 with eight bits.
In signed-magnitude representation 1 0001110
In signed-1's complement representation 1 11 10001
In signed-2's complement representation 1 11 10010
Overflow
• When two numbers of n digits each are added and the sum
occupies n + 1 digits, we say that an overflow occurred.

• Overflow cannot occur after an addition if one number is


positive and the other is negative

• An overflow may occur if the two numbers added are both


positive or both negative.

• An overflow condition can be detected by observing the carry


into the sign bit position and the carry out of the sign bit
position. If these two carries are not equal, an overflow
condition is produced.
Floating point Representation
• The floating-point representation uses a
second register to store a number that
designates the position of the decimal point
in the first register.
• The floating-point representation of a number has two
parts.
– The first part represents a signed, fixed-point number called
the mantissa.
– The second part designates the position of the decimal (or
binary) point and is called the exponent.
• The fixed-point mantissa may be a fraction or an
integer.
• For example, the decimal number + 6132.789 is
represented in floating-point with a fraction and
an exponent as follows:
m x re
• Only the mantissa m and the exponent e are
physically represented in the register (including
their signs). The radix r and the radix-point
position of the mantissa are always assumed.
Fraction Exponent
+0.6132789 +04
A floating-point binary number is represented in a similar manner
except that it uses base 2 for the exponent. For example, the binary
number+1001.11 is represented with a n 8-bit fraction and 6-bit exponent
as follows:

You might also like