Lecture # 04
Prof.Ali Raza
, 1’s and 2’s Complements of Binary Numbers
• They are important because they permit the representation
of negative numbers.
1’s Complement:
• 1’s complement of binary number is easily found by
changing all 1s to 0s and all 0s to 1s.
For example:
Binary Number: 10110010
1’s Complement: 01001101
- To go from the 1’s complement back to true binary,
reverse all the bits.
, 2’s Complement:
Two steps involves:
• Find 1’s complement.
• Add 1 to the LSB of 1’s complement.
2’complemet = (1’s complement) + 1
For example:
- Find 2’complement of 01101.
Binary Number: 01101
1’s complement: 10010
Add 1 + 1
2’s complement 10011
- To go from the 2’s complement from back to true
binary, take the 1’s complement and add 1 to the LSB.