We are familiar with binary number system. The binary number system is mostly use in digital electronics. In binary number system there are only two numbers 1 and 0. The complement is use for binary negative number representation. The different type of complements is possible in binary number system, but One’s complement and two’s complement are mostly use in binary number system. We can find the One’s complement – 1’s complement of binary number by simply inverting the given number.
For example 1’s complement of 1011001 binary numbers is 0100110. We can also find out the 2’s complement of binary number by changing each 1 binary bits into 0 and 0 to 1 (0 to 1 and 1 to 0) than we added 1 to the least significant bit of 1’s complement. For example 2’s complement of 10010 binary number is (01101 + 1) = 01110.
1’s Complement of a Binary Number:
There is simple method to convert a binary number into 1’s complements method. The conversions of 1’s complements we use NOT gate. The output of NOT gate is complements input. We use one NOT gate for one binary number. For example five binary bits we use five NOT gates. Implementation of logic circuit of 5-bit 1’s complements is given as following below.
Example 1: find out one’s complement of 11010.1101
We find out the 1’s complement of the given number, changing all 1’s to 0 and all 0’s into 1’s the 1’s complements 11010.1101 is 00101.0010.
Example 2: find out one’s complement of 100110.1001
We find out the 1’s complements of the given number, changing all 1’s to 0 and all 0’s into 1’s the 1’s complements 100110.1001 is 011001.0110.
1’s Complement Table
Binary Number | 1’s Complement |
0000 | 1111 |
0001 | 1110 |
0010 | 1101 |
0011 | 1100 |
0100 | 1011 |
0101 | 1010 |
0110 | 1001 |
0111 | 1000 |
1000 | 0111 |
1001 | 0110 |
1010 | 0101 |
1011 | 0100 |
1100 | 0011 |
1101 | 0010 |
1110 | 0001 |
1111 | 0000 |
Uses of 1’s Complement Binary Numbers:
The 1’s complements is mostly use to representation of binary signed number and it is also use in various arithmetic operations like addition and subtraction etc.
1’s Complementation in Signed Binary number Representation:
1’s complement is mostly use in binary sign bit representation. The positive number is simple represent as binary number. There is nothing for to do for representation of positive binary number. But in case of representation of negative binary number, we use 1’s complements. If we need to represent negative binary number we are using 1’s complement. For representation of negative number firstly we take positive binary number and then taking 1’s complement by changing 1 to 0 and 0 to 1.
Example: Let we are using 5 bits register. The representation of -5 and +5 will be as follows:
The representation of +5 is 0 0101. In this binary number the most significant bit 0 is use for + sign. Now we take the 1’s complement of 0 0101 is 1 1010. The 1 1010 represent -5. 1 1010 the most significant bit 1 shows the – sign.
Note the drawback of 1’s complements representation is that 0 has two different representation first is -0 (e.g., 1 1111) and second is -0 (e.g., 1 1111).
Now let’s discuss 1’s complement asthmatic operations like addition and substation.
Subtractions by 1’s Complements:
There are some following steps for subtract to binary number using 1’s complements.
- Take 1’s complement of the subtrahend
- Add with minuend
- If the addition result has carry bit, than this carry bit is added to least significant bit (LSB) of given result.
- If addition result has no carry than we take 1’s complements of given number. And this 1’s complement is a negative sign binary number.
Case -1: When carry bit is generated
Eg – Evaluate 10101 – 00101
We take the 1’s complement of subtrahend 00101, which will be 11010, then add 10101 + 11010 =1 01111. Here the carry bit is 1 so this carry bit is added to the least significant bit of the given result i.e., 01111+1=10000 which is the answer.
Case -1: When no carry bit generated
Eg – Evaluate 11110 with 1110
Firstly we convert the subtrahend 11110, into 1’s complements, which will be 00011. Then add 11001 + 00011 =11100. In this addition result there is no carry bit so we take the 1’s complements of the given result which will be 00011, and this is negative number, i.e, 00011, which is the answer.
Additions by 1’s Complements:
Case-1: Addition operation of positive and negative number, when positive number has greater magnitude:
In this case we take the 1’s complements of negative number and the end around carry of the sum is added to the least significant bit.
Example: Add 1110 and -1101.
Firstly we take the 1’s complements of -1101, which will be 0010, and then we perform the addition operation. So, 1110 + 0010 = 1 0000. The carry bit 1 is again added to the least significant bit of the given result. The final result will be 0000 + 1 = 0001.
Case-2: Addition operation of positive and negative number, when negative number has greater magnitude:
When the negative number has greater value, we take the 1’s complements of negative number and perform the addition operation with the given number. Since, it has no end around carry bit, so take 1’s complements of the result and this result will be negative.
Example: Add 1010 and -1100.
We take the 1’s complements of the 01100 which will be 10011 and perform addition operation 01010 + 10011 = 11101. Now we take the 1’s complements of the given result which will be 00010. This is final and negative result.
