# Fixed Point Representation Tutorial with Examples of Computer

## fixed Point Representation

Because of computer hardware limitation everything including the sign of number  has to be represented either by 0’s or 1’s. So, for a positive number the leftmost bit or sign bit is always 0 and for a negative number the sign bit should be 1.

### Representation of Integers

#### The are three possible ways  to represent a number

• Signed magnitude method
• 1’s complement method
• 2’s complement method

### Signed Magnitude Method

Number is divided into two parts, one is sign bit and other part for magnitude, In example we are using 5 bit register to represent – 6 and + 6.

Range of Number For n bit register, MSB will be a sign bit and (n – 1) bits will be magnitude.

### Key Points…………………………………………

Drawback of signed magnitude method is that 0 will be having 2 different representation one will be 10000 i.e., – 0 and the other one will be  00000 +O.

### 1’s Complement Method

Positive numbers are represented in same way as sign magnitude method. If number is negative, then it is represented using 1’s complement method. For this, we first need to represent the number with positive sign a then take l’s complement of this number.

e.g., Suppose we are using 5 bit register. The representation of –6 will be as below.

### Key Points

• The only drawback of 1’s complement method is that there are two different representation for zero, one is – 0 and other is + 0.

### 2’s Complement Method

Positive numbers are represented in same way as in sign magnitude. For representing negative number, we take 2’s complement of the corresponding positive number.