82 Computer Architecture and Organization
4.7.6 Range of Numbers
So far, we have discussed all relevant details related to the oating-point representation using scienti c
notation in binary system, next we may discuss about the range of the numbers that may be expressed in
this format. We take the same 8-bit space, as we have shown in Figure 4.20 (b). Using a sample binary
form assumed to be stored within this 8-bit space, we get ourselves accustomed with this representation.
This is explained through Figure 4.24 .
As we can see from Figure 4.24 (a), we have taken 00111001 as our example binary number. The
leading zero in 7 bit indicates that it is a positive number. The next three bits represent the biased expo-
nent in two’s complement form, and in decimal it would be +3. We must remember that we have decided
to have a base of 2, related with this exponent. We have not shown the leading 1 and the binary point
for the representation of the mantissa 1001 within bits 3 to 0. After adding the leading 1 and the binary
point, this would turn out to be 1.1001. Therefore, in its expanded form, the representation 00111001
would appear as +1.1001 × 2
011
, as shown in Figure 4.24 (b). We may next convert it to its equivalent
decimal form, which would be +1.5625 × 2
3
, as indicated in Figure 4.24 (c). This may further be simpli-
ed to get 12.5 in decimal form, equivalent of our 00111001.
As the discussion on the method of representation is complete, we may now try to nd out the maxi-
mum and minimum positive and negative values that may be expressed with our 8-bit format. Obvi-
ously, for the largest positive value, the sign bit must be 0, the maximum value of biased exponent can
Figure 4.23 Example of normalization for binary number in scientific notation
Figure 4.24 Conversion of a sample binary representation
(without
leading 1)
Binary
point
Binary
point
Leading 1
Base
Decimal
point
Positive
Negative
M04_GHOS1557_01_SE_C04.indd 82M04_GHOS1557_01_SE_C04.indd 82 4/29/11 5:04 PM4/29/11 5:04 PM
Computer Arithmetic 83
be +3, and the mantissa can be 1111. This 1111 is to be transformed to 1.1111 and using the technique
explained through Figure 4.22 may be calculated as 1.9375. Therefore, the largest positive number
becomes +1.9375 × 2
3
, which is 15.5 in decimal [ Figure 4.25 (a)].
In the same manner, we can nd the minimum positive value that may be expressed with our
format, as shown in Figure 4.25 (b). Following our format, this would be 01010000 or 0.125. The
maximum and minimum negative expressions would be 10111111 and 11010000, respectively. Note
that the negative range of biased exponent are kept within 3, although 4 may be expressed within
this format. There is no other reason except to maintain the symmetry in this case. The maximum and
minimum negative numbers may be further calculated as 15.5 and 0.125 in decimal, as shown in
Figure 4.25 (c) and (d).
Therefore, with our 8-bit format, the range of expressible maximum and minimum positive and
negative numbers would be as indicated at the bottom of Figure 4.25 . Note that we cannot indicate
zero through our scheme. Moreover, no values between 0.125 and +0.125 may be represented. The
outside limits would be +15.5 and 15.5. We may now compare Figure 4.25 with Figure 4.19 . We can
readily observe that without using any additional space and just by changing the representation tech-
nique, we have obtained a larger range of numbers. Moreover, the number of places after the decimal
point has also increased. However, the uniformity of spacing of numbers is lost in this scheme. To
explain this, let us calculate a few values with our 8-bit scienti c notation format. These are shown
in Figure 4.26 .
What is the bene t of this scienti c notation scheme of decimal number representation with respect
to the previous one, which uses signed-magnitude representation? We may easily understand that when
we nd out, the range of numbers may be represented in either case. Let us consider only 8-bit repre-
sentations, as we have shown in example sketches. In the rst case (Figure 4.19 ) the minimum number
that may be represented would be 7.9 and the maximum number may be +7.9. Why is it so? We have
Figure 4.25 Range of numbers expressed in scientific notation within 8-bit format
Biased
exponent
(in 2’s
complement)
Positive
Negative
Binary
point
Mantissa
(without
leading 1)
negative
negative
M04_GHOS1557_01_SE_C04.indd 83M04_GHOS1557_01_SE_C04.indd 83 4/29/11 5:04 PM4/29/11 5:04 PM
84 Computer Architecture and Organization
Figure 4.26 Number density in scientific notation
already indicated that the decimal part within 4-bit representation would cover a range between 0 and 9.
It cannot cover a range upto 15 as it does not complete the maximum 2-digit value, i.e., 99. However,
it offers accuracy upto rst place of decimal within the range covered by it. Now, let us consider the
second representation (Figure 4.25 ). The range in this case would be from 15.5 to +15.5. As it may be
readily observed, the available range is extended by adopting the scienti c notation using exponential
system. Therefore, it is preferable to adopt this scheme for representing all types of decimal numbers
within computer memory.
4.7.7 Accuracy
As we can observe from Figure 4.26 , lesser is the value of the exponent, lesser would be the spacing
of the representative numbers. Therefore, between 1 and 2, we observe a spacing of 0.0625, which is
increased to 0.125 between the range from 2 to 4. Between 4 and 8, this spacing (or interval) increases
to 0.25 and, nally between 8 and 15.5, it becomes 0.5. Graphically, this is presented at the bottom of
Figure 4.26 . This indicates one biggest limitation of our notation scheme that we are unable to represent
any number. For example, we are unable to represent 14.25 through our 8-bit scheme. We have to round
it off to either 14.0 or 14.5, so that it may be expressed through our scheme. Therefore, some approxi-
mation as well as rounding off are necessary for representing oating-point numbers using scienti c
notation scheme.
Another point must be evident to the reader that the range of numbers would increase if we expand
the size (available bits) of the exponent. However, if we have to increase the accuracy by decreasing the
space between two successive numbers, then the bits reserved for mantissa must be more. Next comes
the case of trade off. In computers we generally get the word length of 32 bits or 64 bits. Generally,
for higher accuracy, we go for double precision of 64-bit representation. For less accurate cases, 32-bit
representation is taken as suf cient.
M04_GHOS1557_01_SE_C04.indd 84M04_GHOS1557_01_SE_C04.indd 84 4/29/11 5:04 PM4/29/11 5:04 PM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.12.157