FOR FREE YEAR SOLVED

GATE and UGC NET solve

 

Q: GATE(CS) 2013

Q 1. The smallest integer that can be represented by a bit number in 2 complement form is

(A) -256                                         

(B) -128

(C) -127

(D)

 

Before seeing the answer follow: Signed representation by 2’s Complement

 

Solution:

With n bits, the range of numbers that can be represented in 2´s complement form is 

So the smallest number is

So, option (B) is the correct answer.

 

Q: UGC NET: 2014, Q. 17

7) Which of the following is the most efficient to perform arithmetic operations on the numbers?

a) Sign-magnitude

b) 1’s complement

c) 2’s complement

d) 9’s complement

 

Solution:

Option (c) is the correct answer.

 

Explanation:

In sign-magnitude, there are two representations for zero (0)

# In 1’s complement also there are two representations for zero (0).

# In 9’s complement also there are two representations for zero (0).

# In 2’s complement, there is only one representation for zero (0)

 

 

Advantages of 2´s complement representation over the signed magnitude and its complement

1.  2´s complement has only one value for zero, i.e. 2´s complement has the same representation of +0 and -0, unlike other representations.

 

2. 2´s complement arithmetic is faster than 1´s complement arithmetic as there is no need for correction of end-around carry (EAC).

 

In the 2’s complement system is that only one arithmetic operation is required; the 1’s complement requires two operations, (we have to add an extra carry bit i.e., 1 to the result of addition or subtraction to get the correct answer).

 

∴ In the case of performing the arithmetic operations, 2’s complement is the most efficient method.

So, answer: Option (c) 2’s complement.

 

Q. 2. GATE CS 2010

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 is

 

Before seeing the answer please follow chapter: 

Signed representation by 2’s Complement

Decimal to Hexadecimal and Hexadecimal to Decimal

 

Solution:

 

 

 

Option (A) is correct.