Number Representation

  • Last Updated : 12 Mar, 2018


Question 1
The smallest integer that can be represented by an 8-bit number in 2’s complement form is
A
-256
B
-128
C
-127
D
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
The decimal value 0.5 in IEEE single precision floating point representation has
A
fraction bits of 000…000 and exponent value of 0
B
fraction bits of 000…000 and exponent value of −1
C
fraction bits of 100…000 and exponent value of 0
D
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 0.
Question 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
 

A

(C3D8)16
 

B

(187B)16
 

C

(F878)16
 

D

(987B)16
 

GATE CS 2010    Number Representation    
Discuss it


Question 3 Explanation: 

Explanation:

P = (F87B)16 is -1111 1000 0111 1011 in binary

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 performs 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
 

Explanation 2 : (Easy way):

P = (F87B)16 is (1111 1000 0111 1011)2 in binary 

Note that the most significant bit in the binary representation is 1, which implies that the number is negative. To get the value of the number, the 2's complement of the number is performed. We get P as -1925

The binary of (1925)10 is (0000 0111 1000 0101)2

Now 8P= left shift P 3 times = (0011 1100 0010 1000)2   for a negative sign it is  (1011 1100 0010 1000)2

2's Complement = 1100 0011 1101 1000 = (C3D8)16

Quiz of this Question
Please comment below if you find anything wrong in the above post
 

Question 4
(1217)8 is equivalent to
A
(1217)16
B
(028F)16
C
(2297)10
D
(0B17)16
GATE-CS-2009    Number Representation    
Discuss it


Question 4 Explanation: 
(1217)8 = (001 010 001 111)= (0010 1000 1111) = (28F)16
Question 5
In the IEEE floating point representation, the hexadecimal value 0 × 00000000 corresponds to
A
the normalized value 2-127 
B
the normalized value 2-126
C
the normalized value +0 
D
the special value +0 
GATE CS 2008    Number Representation    
Discuss it


Question 5 Explanation: 

 \frac{Exponent}{All \hspace{0.1cm} Zero} \frac{Fraction}{All \hspace{0.1cm} Zero} \frac{Number}{Positive  \hspace{0.1cm} or\hspace{0.1cm} negative \hspace{0.1cm}zero}
Question 6
Let r denote number system radix. The only value(s) of r that satisfy the equation 12
A
decimal 10
B
decimal 11
C
decimal 10 and 11
D
any value > 2
GATE CS 2008    Digital Logic & Number representation    Number Representation    
Discuss it


Question 6 Explanation: 
As we can see 121 contains digit ‘2’ which can’t be represented directly in base ‘2’ (as digits should be less than base) so number system must have   “r>2”. Ans (D) part.
Question 7
Consider the equation (123)5 = (x8)y with x and y as unknown. The number of possible solutions is _____ .
A
1
B
2
C
3
D
4
GATE-CS-2014-(Set-2)    Digital Logic & Number representation    Number Representation    
Discuss it


Question 7 Explanation: 
Changing (123) base 5 into base 10= 1*25+2*5+3*1=38 Changing x8 base y in decimal= x*y+8 Equating both we get xy+8=38
  • xy=30
  • possible combinations =(1,30),(2,15),(3,10)
but we have ‘8’ present in x8 so base y>8 as all three are satisfying the conditions so total solutions =3 hence ans is ( C) part
Question 8
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
A
C1640000H
B
416C0000H
C
41640000H
D
C16C0000H
GATE-CS-2014-(Set-2)    Number Representation    
Discuss it


Question 8 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 9
The range of integers that can be represented by an n bit 2's complement number system is
A
- 2n - 1 to (2n - 1 - 1)
B
- (2n - 1 - 1) to (2n - 1 - 1)
C
- 2n - 1 to 2n - 1
D
- (2n - 1 + 1) to (2n - 1 + 1)
GATE-CS-2005    Number Representation    
Discuss it


Question 9 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 10
The hexadecimal representation of 6578 is
A
1AF
B
D78
C
D71
D
32F
GATE-CS-2005    Digital Logic & Number representation    Number Representation    
Discuss it


Question 10 Explanation: 
We can first convert to Binary, we get 110 101 111. Then convert binary to base 16, we get 1AF (0001 1010 1111). (657)base 8= Writing binary of each digit=>  110=6 => 101=5 => 111=7 Adding extra 0’s I beginning to make groups of 4 binary digits each 000110101111= 0001 1010 1111 In octal
  • 0001 =1
  • 1010 =A
  • 1111 =F
So Ans is (A) part.
There are 87 questions to complete.
My Personal Notes arrow_drop_up