1. Home
  2. Docs
  3. Digital Logic
  4. Binary Systems
  5. 1`s and 2`s complement

1`s and 2`s complement

Note: The 1`s complement and the 2`s complement of a binary number are important because they permit the representation of negative numbers.

∴ Finding the 1`s complement:-

The 1`s complement of a binary number is found by changing all 1s to 0s and all 0s to 1s.

How to find 1`s complement of binary number.

Screenshot 2023 09 14 151753

1`s complement using NOT gate.

image 16
Q). Find the 1`s complement of (10110)2
solution:-

1`s complements = 01001

Finding the 2`s complement

The 2`s complement of a binary number is found by adding 1 to the LSB of the 1`s complement.

2`s complement = (1`s complement) + 1

How find 2`s complement of binary number?

Screenshot 2023 09 14 154229

Alternative way to find direct 2`s complement

  • Start at the right with the LSB and write the bits as they are up to and including the first 1.
  • Yake the 1`s complement of the remaining bits
Screenshot 2023 09 14 155437

In the above solution, we should write the same binary digits from right to left until we found 1, after that change the remaining bits into 1`s complement as shown above.

Screenshot 2023 09 14 160020

→ Subtraction using 1`s complement

Step 1:- Take 1`s complement of subtrahend

Step 2:- Add 1`s complement of subtrahend with minuend

• Step 3:- If got a carry, add the carry to its LSB. Else take 1’s complement of the result and put negative sign

Screenshot 2023 09 15 170253
Screenshot 2023 09 15 171533
Screenshot 2023 09 15 171554

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *