Page 78 - Engineering Digital Design
P. 78
2.8 FLOATING-POINT NUMBER SYSTEMS 49
2.7 EXCESS (OFFSET) REPRESENTATIONS
Other systems for representing negative numbers use excess or offset (biased) codes. Here,
a bias B is added to the true value N r of the number to produce an excess number, N xs,
given by
N^^Nr + B. (2.16)
n }
When B = r ~ exceeds the usable bounds of negative numbers, N xs remains positive.
Perhaps the most common use of the excess representation is in floating-point number sys-
tems — the subject of the next section. The biased-weighted BCD code, XS3, was discussed
in Subsection 2.4.1.
Two examples of excess 127 representation are given below.
EXAMPLE 2.18
-4310 11010101 Nrscompi.
+ 127ip 01111111 B
84io 01010100 N xs = —4310 in excess 127 representation
EXAMPLE 2.19
27 10 00011011 N rsCompl
01111111 B
154 )0 10011010 NXS = 27io in excess 127 representation
n l
The representable decimal range for an excess 2 ~ number system is — 2"~' through
l
[
+(2"~ — 1) for an n-bit binary number. However, if Af 2 + B > 2"~ — 1, overflow occurs
1
1
and 2"" must be subtracted from (AT 2 + B) to give the correct result in excess 2"" code.
2.8 FLOATING-POINT NUMBER SYSTEMS
In fixed-point representation [Eq. (2. 1)], the radix point is assumed to lie immediately to the
right of the integer field and at the left end of the fraction field. The fixed-point system is the
most commonly used system for representing bounded orders of magnitude. For example,
with 32 bits a binary number could represent decimal numbers with upper and lower bounds
]
of the order of ± 1 0 ° and ± 1 0" ' ° . However, for greatly expanded bounds of representation,
as in scientific notation, the floating-point representation is needed. This form of number
representation is commonly used in computers.
A floating-point number (FPN) in radix r has the general form
E
FPN) r = M x r , (2.17)
where M is the fraction (or mantissa) and E is the exponent. Only fraction digits are used
34
for the mantissa! Take, for example, Planck's constant h = 6.625 x 10~ J s. This number