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 |
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
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 |
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
(C3D8)16 | |
(187B)16 | |
(F878)16 | |
(987B)16 |
Discuss it
Question 3 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
Question 4 |
(1217)8 is equivalent to
(1217)16 | |
(028F)16 | |
(2297)10 | |
(0B17)16 |
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 |
Discuss it
Question 5 Explanation:

Question 6 |
decimal 10 | |
decimal 11 | |
decimal 10 and 11 | |
any value > 2 |
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 _____ .
1 | |
2 | |
3 | |
4 |
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)
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
C1640000H | |
416C0000H | |
41640000H | |
C16C0000H |
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
- 2n - 1 to (2n - 1 - 1) | |
- (2n - 1 - 1) to (2n - 1 - 1) | |
- 2n - 1 to 2n - 1 | |
- (2n - 1 + 1) to (2n - 1 + 1) |
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
1AF | |
D78 | |
D71 | |
32F |
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
There are 87 questions to complete.