The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+21 votes

+38 votes

Best answer

$2's$ complement representation is not same as $2's$ complement of a number. In $2's$ complement representation positive integers are represented in its normal binary form while negative numbers are represented in its $2's$ complement form. So, **(c) **is correct here.

http://www.ele.uri.edu/courses/ele447/proj_pages/divid/twos.html

0

Is this wrong then .???? It's so confusing re...

http://binary-system.base-conversion.ro/converted-signed-integer-from-decimal-system-to-binary-two-complement.php?signed_integer_number_base_ten=-43&binary_two_complement=11010101

http://binary-system.base-conversion.ro/converted-signed-integer-from-decimal-system-to-binary-two-complement.php?signed_integer_number_base_ten=-43&binary_two_complement=11010101

+4 votes

This is exactly the sort of question, which come under "silly mistakes " Category After exam.

Reading the question carefully is very important , answer will be 1's complement of 43 , i.e. C)

**00101011.**

+2 votes

As we know 2's complement of a number vary from

-( 2

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

43 is between -64 to 63, so n= 7. Therefore minimum 7 bits is needed.

In 2's complement representation, for positive number the number can be written as 0 followed by its binary representation.

for negative number 1 followed by 2's complement of it's binary representation.

As 43 is a positive number so 0 followed by binary representation of 43

43 = 32+8+2+1 = 0101011

But options are in 8 bit representation so we can make 7bit number to 8bit by sign extension in 2's complement representation i.e if first bit is 1 the new leftmost bit will be 1 and if it is zero then new leftmost bit will be 0.

so we can rewrite 43 as 00101011 which **is option C.**

- All categories
- General Aptitude 1.6k
- Engineering Mathematics 7.5k
- Digital Logic 3k
- Programming & DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6k
- Compiler Design 2.1k
- Databases 4.2k
- CO & Architecture 3.5k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.5k
- Admissions 584
- Exam Queries 566
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,108 questions

53,221 answers

184,627 comments

70,462 users