Number Systems
13
Hexadecimal system
N = m × 16
e
(1.3)
Binary system
N = m × 2
e
(1.4)
For example, decimal numbers 0.0003754 and 3754 will be represented in floating-point notation
as 3.754 × 10
−4 and 3.754 × 10
3 respectively. A hex number 257.ABF will be represented as
2.57ABF × 16
2 . In the case of normalized binary numbers, the leading digit, which is the most
significant bit, is always ‘1’ and thus does not need to be stored explicitly.
Also, while expressing a given mixed binary number as a floating-point number, the radix point is
so shifted as to have the most significant bit immediately to the right of the radix point as a ‘1’. Both
the mantissa and the exponent can have a positive or a negative value.
The mixed binary number (110.1011) 2 will be represented in floating-point notation as .1101011
× 2
3
= .1101011e + 0011. Here, .1101011 is the mantissa and e + 0011 implies that the exponent is
+3. As another example, (0.000111) 2 will be written as .111e − 0011, with .111 being the mantissa
and e − 0011 implying an exponent of −3. Also, (−0.00000101) 2 may be written as −.101 × 2
−5
=
−.101e − 0101, where −.101 is the mantissa and e − 0101 indicates an exponent of −5. If we wanted
to represent the mantissas using eight bits, then .1101011 and .111 would be represented as .11010110
and .11100000.
1.17.1 Range of Numbers and Precision
The range of numbers that can be represented in any machine depends upon the number of bits in the
exponent, while the fractional accuracy or precision is ultimately determined by the number of bits
in the mantissa. The higher the number of bits in the exponent, the larger is the range of numbers
that can be represented. For example, the range of numbers possible in a floating-point binary number
format using six bits to represent the magnitude of the exponent would be from 2
−64 to 2
+64 , which
is equivalent to a range of 10
−19 to 10
+19 . The precision is determined by the number of bits used to
represent the mantissa. It is usually represented as decimal digits of precision. The concept of precision
as defined with respect to floating-point notation can be explained in simple terms as follows. If the
mantissa is stored in n number of bits, it can represent a decimal number between 0 and 2
n
− 1 as the
mantissa is stored as an unsigned integer. If M is the largest number such that 10
M
− 1 is less than or
equal to 2
n
− 1, then M is the precision expressed as decimal digits of precision. For example, if the
mantissa is expressed in 20 bits, then decimal digits of precision can be found to be about 6, as 2
20
− 1
equals 1 048 575, which is a little over 10
6
− 1. We will briefly describe the commonly used formats
for binary floating-point number representation.
1.17.2 Floating-Point Number Formats
The most commonly used format for representing floating-point numbers is the IEEE-754 standard.
The full title of the standard is IEEE Standard for Binary Floating-point Arithmetic (ANSI/IEEE STD
754-1985). It is also known as Binary Floating-point Arithmetic for Microprocessor Systems, IEC
Précédent

- 35/741

Suivant