Number Representation

Question 1
The smallest integer that can be represented by an 8-bit number in 2’s complement form is
Cross
-256
Tick
-128
Cross
-127
Cross
0


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
Cross
fraction bits of 000…000 and exponent value of 0
Tick
fraction bits of 000…000 and exponent value of −1
Cross
fraction bits of 100…000 and exponent value of 0
Cross
no exact representation


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
 

Tick

(C3D8)16
 

Cross

(187B)16
 

Cross

(F878)16
 

Cross

(987B)16
 



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
Cross
(1217)16
Tick
(028F)16
Cross
(2297)10
Cross
(0B17)16


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
Cross
the normalized value 2-127 
Cross
the normalized value 2-126
Cross
the normalized value +0 
Tick
the special value +0 


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
Cross
decimal 10
Cross
decimal 11
Cross
decimal 10 and 11
Tick
any value > 2


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 _____ .
Cross
1
Cross
2
Tick
3
Cross
4


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
Tick
C1640000H
Cross
416C0000H
Cross
41640000H
Cross
C16C0000H


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
Tick
- 2n - 1 to (2n - 1 - 1)
Cross
- (2n - 1 - 1) to (2n - 1 - 1)
Cross
- 2n - 1 to 2n - 1
Cross
- (2n - 1 + 1) to (2n - 1 + 1)


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
Tick
1AF
Cross
D78
Cross
D71
Cross
32F


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.

  • Last Updated : 12 Mar, 2018

Share your thoughts in the comments
Similar Reads