Professional Documents
Culture Documents
Implementing Binary
Adder and Subtractor
Circuits
Brief Description: Binary adder and subtractor circuits are common examples of
combinational circuits which can be easily designed and implemented.
COMPETENCIES
LABORATORY EXERCISE 4
Implementing Binary Adder and Subtractor Circuits
• build, test and generate the truth tables for the half-adder, full-adder, half-
subtractor, and full-subtractor circuits.
LABORATORY EXERCISE 4
Implementing Binary Adder and Subtractor Circuits
1 Solderless breadboard
1 IC 7486 or 74LS86 (Quad Two-Input XOR gate)
1 IC 7404 or 74LS04 (Hex Inverter/Not gate)
1 IC 7408 or 74LS08 (Quad Two-Input AND gate)
1 IC 7432 or 74LS32 (Quad Two-Input OR gate)
1 DC power supply with +5V
1 set of connecting wires
1 wire stripper / cutter
1 DIP Switch
2 47ohms resistor, ¼ watt
2 LEDs
Binary adders and subtractors are combinational circuits that can perform the
operations of addition and subtraction of binary numbers, respectively. In this lab, we
will study and construct various adder and subtractor circuits.
The combinational circuit that adds only two bits is called half adder.
x Half Adder C
(HA)
y S
Full Adder (FA) is a combinational circuit that adds three bits. It generates two
outputs: Sum (S) and carry (C). Full adders allow for the addition of multi-bit numbers.
A Designer just needs to provide a way for carries to propagate between bit positions.
The subtraction of two binary numbers can be done by taking the 2’s
complement of the subtrahend and adding it to the minuend. The 2’s complement can
be obtained by taking the 1’s complement (i.e., inverting all the bits) and adding 1. For
example, to perform A – B, we complement the four bits of B, add them to their
corresponding four bits of A, and add 1. The simplest way to add a binary 1 is to insert
it through the input carry.
The following figure shows the adder-subtractor circuit. The mode input M
controls the operation. When M=0, the circuit is an adder. Whereas, when M=1, the
circuit becomes a subtractor. Although the figure is for only four bits, this circuit can
be cascaded for any number of inputs.
Note: During subtraction, if A ≥ B, the result is a positive number and the output
carry is equal to 1. If A < B, the subtraction gives a negative difference represented in
the 2’s complement format and the output carry is equal to 0. Therefore, during
subtraction, the carry actually represents the inversion of the borrow.
III - PROCEDURES
1. Build the half adder circuit with LED output indicator for the sum and carry
outputs as shown in the figure below. Use as guide the datasheets in the
appendices for proper pin assignment of the ICs to be used. Double-check your
wiring against the given circuit diagram. Ensure that all the needed pins of the
ICs are properly connected.
2. Test the circuit by applying power to the circuit with +5V. Vary the inputs A and
B using the DIP switch. Observe the output in the LED indicator for sum and
carry. If the LED emits light or in the ON state, the gate output is high or ‘1’ and
if the LED did not emit light or in the OFF state, the gate output is low or ‘0’.
Record this output in Table 1 in Section IV.
3. Determine the Boolean expression of the circuit by writing the sum and carry
functions in the last row of Table 1.
1. Build the full-adder circuit with LED output indicator for the sum and carry
outputs as shown in the figure below. Use as guide the datasheets in the
appendices for proper pin assignment of the ICs to be used. Double-check your
wiring against the given circuit diagram. Ensure that all the needed pins of the
ICs are properly connected.
2. Test the circuit by applying power to the circuit with +5V. Vary the inputs A, B
and C using the DIP switch. Observe the output in the LED indicator for sum
and carry. If the LED emits light or in the ON state, the gate output is high or ‘1’
and if the LED did not emit light or in the OFF state, the gate output is low or
‘0’. Record this output in Table 2 in Section IV.
3. Determine the Boolean expressions of the circuit by writing the sum and carry
functions in the last row of Table 2.
1. Making use of what you have learned in Boolean Algebra, formulate the truth
table for a half-subtractor circuit that subtracts 2-bits. Fill-out the truth table 3
in Section IV.
3. Draw the logic diagram of the simplified Boolean equation of the half-subtractor
circuit. Implement the circuit in the breadboard and verify the results to your
formulated truth table.
1. Making use of what you have learned in Boolean Algebra, formulate the truth
table for a full-subtractor circuit that subtracts 3-bits. Fill-out the truth table 4 in
Section IV.
3. Draw the logic diagram of the simplified Boolean equation of the full-subtractor
circuit. Implement the circuit in the breadboard and verify the results to your
formulated truth table.
IV - RESULTS/ VERIFICATION:
Table 1 (Half-Adder)
Inputs Output
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Boolean Functions:
Carry = A × B = AB
VI - POST-LABORATORY ASSESSMENT:
Design a 4-bit binary decrementer circuit using four half adders. Simulate the circuit
using Logisim or Proteus.