__Representation of Fractions in Binary__

__FIXED·POINT REPRESENTATION __

Fractions can be written in binary by extending the binary notation explained for integers above.

In a binary number the digits after the point represent 1/2, 1/4, 18/, etc.

__Worked question __

Give the decimal equivalents of the binary numbers

(a) 110.11 (b) 0.001

(a) 110_{2} =6_{10}

0.11_{2} =1/2+1/4=0.5+0.25

=0.75

∴ 110.11_{2}=6.75_{10}

(b) 0.001_{2} = 1/ 8

=0.125_{10}

** A fixed-point number** is one which is represented by a set of digits with the point in its correct position.

e.g. 313.45 is a fixed-point decimal number;

1101.1101 is a fixed-point binary number.

__FLOATING-POINT REPRESENTATION __

The mantissa of a number consists of the actual digits in it. The point is put at some fixed position (often in front of the first digit).

e.g. The mantissa of 34.234 is .34234

The exponent of a number gives the position of the binary or decimal point.

e.g. If the position is measured from the left of the number, the exponent of 34.234 is 2.

A floating-point number is one which is represented by writing the mantissa and the exponent.

__Examples of floating-point representation __

1- The decimal number 672.4 could be written as .6724 E3.

E is for exponent. The 3 indicates three significant figures to the left of the decimal point.

2- The binary number 110.1101 could be stored with an eight-bit mantissa and a four-bit exponent as 01101101 0011.

Here 01101101 is the mantissa. The first bit is a sign bit. It has been assumed that the point is just after the sign bit. The mantissa represents 0.1101101.

The number 110.1101 has three significant figures to the left of the point. Therefore the exponent is three. Expressed as a four-bit binary number, this is 001l.

__Advantages of floating-point representation __

Very large numbers or very small fractions can be stored using quite a small number of bits.

__Disadvantage of floating-point representation __

Numbers are not stored very precisely by this method. If a number has a lot of digits some of them may be lost. The mantissa can only be allowed a certain number of bits for storage. It is therefore only correct to a certain number of significant figures.