Binary system complements
Complements are used in the digital computers in order to simplify the subtraction operation and for the logical manipulations.
As the binary system has base r = 2. So the two types of
complements for the binary system are 2's complement and 1's complement.
1's complement
The 1's complement of a number is found by changing all 1's
to 0's and all 0's to 1's. This is called as taking complement or 1's
complement. Example of 1's Complement is as follows.
2's complement
The 2's complement of binary number is obtained by adding 1
to the Least Significant Bit (LSB) of 1's complement of the number.
2's complement = 1's complement + 1
Example of 2's Complement is as follows.
Binary arithmetic
Binary arithmetic is essential part of all the digital
computers and many other digital system.
1. Binary Addition
It is a key for binary subtraction, multiplication,
division. There are four rules of binary addition.
In fourth case, a binary addition is creating a sum of (1 +
1 = 10) i.e. 0 is written in the given column and a carry of 1 over to the next
column.
Example − Addition
2. Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for the
binary subtraction. There are four rules of binary subtraction.