Reals may be represented in a computer as follows...
The binary point would be fixed in a specified position. Bits
to the left of this point would be the integer part and bits to the right of it would be the
fraction part.
Example : A computer uses 8 bits to represent signed numbers.
The binary point is fixed as being after the 4th bit.
What denary number is represented by 00110110 ?
Sign |
4 |
2 |
1 |
. |
0.5 |
0.25 |
0.125 |
0.0625 |
0 |
0 |
1 |
1 |
. |
0 |
1 |
1 |
0 |
= 3.375
|