# Binary Data Representation

## Binary Data Representation

A binary number may also have a binary point, in addition to the sign. The binary point is used for representing fractions, integers and integer-fraction numbers. Registers are high-speed storage areas within the Central Processing Unit (CPU) of the computer. All data are brought into a register before it can be processed. For example, if two numbers are to be added, both the numbers are brought in registers, added, and the result is also placed in a register. There are two ways of representing the position of the binary point in the register —
» Fixed point number representation
» Floating point number representation

» Fixed point number representation
The fixed point number representation assumes that the binary point is fixed at one position either at the extreme left to make the number a fraction, or at the extreme right to make the number an integer. In both cases, the binary point is not stored in the register, but the number is treated as a fraction or integer. For example, if the binary point is assumed to be at extreme left, the number 1100 is actually treated as 0.1100.

» Floating point number representation
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.

## Fixed Point Number Representation

The integer binary signed number is represented as follows—
• 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.

Signed magnitude and signed 1’s complement representation are seldom used in computer arithmetic.

## Floating Point Number Representation

The floating point representation of a number has two parts—mantissa and exponent. The mantissa is a signed fixed point number. The exponent shows the position of the binary point in the mantissa.

Example : the binary number +11001.11 with an 8−bit mantissa and 6−bit exponent is represented as follows—
• Mantissa is 01100111. The left most 0 indicates that the number is positive.
• Exponent is 000101. This is the binary equivalent of decimal number + 5.
• The floating point number is Mantissa x 2exponent, i.e., + (.1100111) x 2+5

The arithmetic operation with the floating point numbers is complicated, and uses complex hardware as compared to the fixed point representation. However, floating point calculations are required in scientific calculations, so, computers have a built−in hardware for performing floating point arithmetic operations.