Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

2s Complement Manual

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Realization of logic gates to generate r’s complement using logic gates

Aim: To generate r’s complement using logic gates

Components required:

OR gate IC-7432

AND gate IC-7408

Not gate IC-7404

Theory:

Just like 1's complement, 2's complement is also used to represent the signed binary numbers. For
finding 2's complement of the binary number, we will first find the 1's complement of the binary number
and then add 1 to the least significant bit of it.

For example, if we want to calculate the 2's complement of the number 1011001, then firstly, we find the
1's complement of the number that is 0100110 and add 1 to the LSB. So, by adding 1 to the LSB, the
number will be (0100110)+1=0100111. We can also create the logic circuit using OR, AND, and NOT
gates. The logic circuit for finding 2's complement of the 5-bit binary number is as follows:

For finding 2's complement of the given number, change all 0's to 1 and all 1's to 0. So the 1's
complement of the number 110100 is 001011. Now add 1 to the LSB of this number, i.e.,
(001011)+1=001100.

For finding 1's complement of the given number, change all 0's to 1 and all 1's to 0. So, the 1's
complement of the number 100110 is 011001. Now add one the LSB of this number, i.e.,
(011001)+1=011010.

Logic diagram:
Truth table:

Binary 1’s complement 2’s complement


number
0000 1111 0000
0001 1110 1111
0010 1101 1110
0011 1100 1101
0100 1011 1100
0101 1010 1011
0110 1001 1010
0111 1000 1001
1000 0111 1000
1001 0110 0111
1010 0101 0110
1011 0100 0101
1100 0011 0100
1101 0010 0011
1110 0001 0010
1111 0000 0001

Procedure:

1. Connections are given as per the circuit diagram

2. Logical inputs are given as per the circuit diagram

3. Observe the output and verify Truth table

Result: r’s complement using logic gates verified

You might also like