The fixed point number representation assumes that the binary point is fixed at one position. The binary point is not actually present in the register, but its presence is assumed based on whether the number which is stored is a fraction or an integer.
The floating point number representation uses two registers. The first register stores the number without the binary point. The second register stores a number that indicates the position of the binary point in the first register.
We shall now discuss representation of data in the fixed point number representation and floating point number representation.
4.1. Fixed Point Number Representation
- For a positive integer binary number, the sign bit is 0 and the magnitude is a positive binary number.
- For a negative integer binary number, the sign bit is 1. The magnitude is represented in any one of the three ways-
- Signed Magnitude representation - The magnitude is the positive binary number itself.
- Signed 1’s complement representation - The magnitude is the 1’s complement of the positive binary number.
- Signed 2’s complement representation - The magnitude is the 2’s complement of the positive binary number.
- Represent the positive number in binary form.(For e.g., +5 is 0000 0101 and +10 is 0000 1010)
- Represent the negative number in 2’s complement form. (For e.g., -5 is 1111 1011 and -10 is 1111 0110)
- Add the bits of the two signed binary numbers.
- Ignore any carry out from the sign bit position.