Design of binary subtractor using MSI ICs
IC 74LS83 is a 4-bit parallel binary adder chip. It adds/subtracts a four-bit number (nibble) with another 4-bit number. The block symbol for the IC is shown in Fig.1. This IC has two sets of 4-bit inputs along with a carry input C0. It performs binary subtraction on the A & B inputs and the carry input C0. It generates a 4-bit Difference and a Borrow out C4.
Four-bit Subtraction: When Control input is set = 1, the Carry –in input C0 = 1. In this situation, the Ex-OR gates will provide 1,’s complement of the Input-2 to the B-inputs of Adder IC. Moreover as C0 = 1, the addition of 1 to the 1’s complement of B gives 2’s complement of B.Now the IC74LS83 adds Input-1 i.e. A4,A3, A2,A1 to the 2’s complemet of B and produces the Carry and Sum output on C4 & the lines Σ4, Σ3, Σ2, & Σ1.
Example1: Let Input-1 = A4 A3 A2 A1 = 1001 & Input-2 = 0111 & control input be set to 1.1’s complement of 0111 = 1000. Since carry input C0 = 1, the input B becomes,
B4 B3 B2 B1 = 1000 + 1 = 1001.
Now IC 74LS83 performs addition of A & 2,s complement of B and produces the output.
Since a Carry is generated discard the Carry and the Sum is the final output of subtraction operation.
The result is Σ4 Σ3 Σ2 & Σ1 = 0 0 1 0.
Example2: Let Input-1 = A4 A3 A2 A1 = 0111 & Input-2 = 1001 & control input be set to 1.
1’s complement of Input-2 i.e. 1001 = 0110 Since carry input C0 = 1, the input B becomes,
B4 B3 B2 B1 = 0110 + 1 = 0111.
Now IC 74LS83 performs addition of A & 2’s complement of B and produces the output.
In this case no Carry is generated during addition. Hence the answer can be obtained by taking the 2’s complement of the Sum output and attaching a negative sign.So the 2’s complement of 1110 = 0010 and the final result of subtraction is Σ4 Σ3 Σ2 & Σ1 = - 0 0 1 0.