Discussion
The 2’s complement of the 8-bit binary number 00101100 is
Answer: D
Correct answer: 11010100
The 2’s complement is formed by inverting every bit and adding 1. Starting from 00101100, inversion gives 11010011, and adding 1 gives 11010100. Note that 11010011 - the second option - is the 1’s complement, which is the classic trap. A quicker method for hand working: copy the bits from the right up to and including the first 1, then invert everything to the left of it. Here the rightmost 1 is in the third position, so 100 is copied and 00101 becomes 11010, giving the same answer. 2’s complement is the standard representation for signed integers because it makes subtraction identical to addition - the processor needs no separate subtractor - and because it has only one representation of zero, unlike 1’s complement and sign-magnitude, which have two. In eight bits it represents the range −128 to +127, the asymmetry arising from that single zero.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development