## Number Representation

Question 1 |

The smallest integer that can be represented by an 8-bit number in 2’s complement form is

-256 | |

-128 | |

-127 | |

0 |

**GATE CS 2013**

**Number Representation**

**Discuss it**

Question 1 Explanation:

See Two's complement
For n bit 2's complement numbers, range of number is -(2

^{(n-1)}) to +(2^{(n-1)}-1)Question 2 |

T he decimal value 0.5 in IEEE single precision floating point representation has

fraction bits of 000…000 and exponent value of 0 | |

fraction bits of 000…000 and exponent value of −1 | |

fraction bits of 100…000 and exponent value of 0 | |

no exact representation |

**GATE CS 2012**

**Number Representation**

**Discuss it**

Question 2 Explanation:

The IEEE 754 standard specifies following distribution of bits:
Sign bit: 1 bit
Exponent width: 8 bits
Significand or Fraction: 24 (23 explicitly stored)
0.5 in base 10 means 1 X 2

^{-1}in base 2. So exponent bits have value -1 and all fraction bits are 0Question 3 |

P is a 16-bit signed integer. The 2's complement representation of P is (F87B)

_{16}.The 2's complement representation of 8*P(C3D8) _{16} | |

(187B) _{16} | |

(F878) _{16} | |

(987B) _{16} |

**GATE CS 2010**

**Number Representation**

**Discuss it**

Question 3 Explanation:

P = (F87B)

_{16}is -1111 1000 0111 1011 in bianry Note that most significant bit in the binary representation is 1, which implies that the number is negative. To get the value of the number perform the 2's complement of the number. We get P as -1925 and 8P as -15400 Since 8P is also negative, we need to find 2's complement of it (-15400) Binary of 15400 = 0011 1100 0010 1000 2's Complement = 1100 0011 1101 1000 = (C3D8)_{16}Question 4 |

(1217)

_{8}is equivalent to(1217) _{16} | |

(028F) _{16} | |

(2297) _{10} | |

(0B17) _{16} |

**GATE-CS-2009**

**Number Representation**

**Discuss it**

Question 4 Explanation:

(1217)

_{8}= (001 010 001 111)_{8 }= (0010 1000 1111) = (28F)_{16}Question 5 |

In the IEEE floating point representation, the hexadecimal value 0 × 00000000 corresponds to

the normalized value 2 ^{-127} | |

the normalized value 2 ^{-126} | |

the normalized value +0 | |

the special value +0 |

**GATE CS 2008**

**Number Representation**

**Discuss it**

Question 6 |

The value of a float type variable is represented using the single-precision 32-bit floating point format IEEE-754 standard that uses 1 bit for sign, 8 bits for biased exponent and 23 bits for mantissa. A float type variable X is assigned the decimal value of −14.25. The representation of X in hexadecimal notation is

C1640000H | |

416C0000H | |

41640000H | |

C16C0000H |

**GATE-CS-2014-(Set-2)**

**Number Representation**

**Discuss it**

Question 6 Explanation:

Since No is negative S bit will be 1 Convert 14.25 into binary 1110.01 Normalize it : 1.11001 X 2 ^ 3 Biased Exponent (Add 127) : 3 + 127 = 130 (In binary 10000010) Mantissa : 110010.....0 (Total 23 bits) Num represented in IEEE 754 single precision format : 1 10000010 11001000000000000000000 In Hex (Group of Four bits) - 1100 0001 0110 0100 0000 0000 0000 0000 Num becomes : C1640000

Question 7 |

The range of integers that can be represented by an n bit 2's complement number system is

- 2 ^{n - 1} to (2^{n - 1} - 1) | |

- (2 ^{n - 1} - 1) to (2^{n - 1} - 1) | |

- 2 ^{n - 1} to 2^{n - 1} | |

- (2 ^{n - 1} + 1) to (2^{n}^{ - 1 }+ 1) |

**GATE-CS-2005**

**Number Representation**

**Discuss it**

Question 7 Explanation:

For example, signed char is 8 bits, we can store from -128 to 127 using sign char. Refer http://en.wikipedia.org/wiki/Two%27s_complement
for more details.

Question 8 |

If 73

_{x}(in base-x number system) is equal to 54_{y}(in base-y number system), the possible values of x and y are8, 16 | |

10, 12 | |

9, 13 | |

8, 11 |

**GATE-CS-2004**

**Number Representation**

**Discuss it**

Question 8 Explanation:

We can solve it by converting both to decimals.
3 + 7*8 = 4 + 11*5

Question 9 |

What is the result of evaluating the following two expressions using three-digit floating point arithmetic with rounding?

(113. + -111.) + 7.51 113. + (-111. + 7.51)

9.51 and 10.0 respectively | |

10.0 and 9.51 respectively | |

9.51 and 9.51 respectively | |

10.0 and 10.0 respectively |

**GATE-CS-2004**

**Number Representation**

**Discuss it**

Question 9 Explanation:

(113. + -111.) + 7.51 = 2 + 7.51 = 9.51 113. + (-111. + 7.51) = 113. + (-111. + 7.51) = 113. - 103. = 10 [103.49 is rounded to 103.0]

Question 10 |

Let A = 1111 1010 arid B = 0000 1010 be two 8-bit 2's complement numbers. Their product in 2's complement is

1100 0100 | |

1001 1100 | |

1010 0101 | |

1101 0101 |

**GATE-CS-2004**

**Number Representation**

**Discuss it**

Question 10 Explanation:

Here, we have
A = 1111 1010 = - 6

_{10}(A is a 2's complement number) B = 0000 1010 = 10_{10}(B is a 2's complement number) A x B = - 60_{10}= 1 011 1100_{2}= 1 100 0011 (1's complement) = 1 100 0100 (2's complement) Thus, the product of A and B in 2's complement is 1100 0100, which is option A. So, A is the correct option. Please comment below if you find anything wrong in the above post.
There are 23 questions to complete.