$25
Physical gates are built out of transistors, and require physical signals that use correct voltage levels for inputs and produce physical signals with correct voltage levels for outputs. To work correctly, the transistor circuits that comprise a gate must have connections to a voltage supply and to ground. For example, in the case of 74-series logic circuits used in this lab, the supply voltage (Vcc) must be 5 volts. In these integrated circuit packages, several gates are contained. Search Google specifying that gate number and its function (e.g. "7486 XOR gate") for pin connection diagrams, such as the pin diagram shown in Figure 1. You must have the pin diagrams for each gate you want to use, in order to do the following tasks. You can find pinout of rest of 74-series gates here: . Other gates you need today are: 7408 quad 2-input AND gate, 7432 quad 2-input OR gate, and 7404 six INVERTER.
Figure 1: 7486 Quad 2-input XOR gates
First, read the document posted in Moodle: “Circuit Schematic versus Logic Diagram”. Then, using the logic diagram of Half Adder in Figure 2, draw a circuit schematic of the digital circuit you will build. This should include pin numbers marked on the inputs and outputs of all the gates, part numbers (IC’s code) of the IC package marked on each gate, plus power and ground connections marked on the side of the drawing. After that, draw the circuit schematics for Half Subtractor shown in Figure 3 and Lab Calculator given in Figure 4. Upload your schematics to Moodle as a pdf file before your lab session starts. Late submissions won’t be accepted. You are advised to draw using tools like draw.io, but you are allowed to draw by hand and then scan/take a photo, as long as it is readable.
Figure 2: Half Adder
Figure 3: Half Subtractor
Control Input C
Function
Function
Output Y
Output Z
0
A + B
Half Adder
Sum (S)
Carry Out (Co)
1
A – B
Half Subtractor
Difference (D)
Borrow out (Bo)
Figure 4: Lab Calculator
Part 1: Building Half Adder & Subtractor
(1) Ask the TA or Tutor to come and check your schematics. Do not proceed to the next step until you have verified that your circuit schematics are correct, and the TA or Tutor has approved them.
(2) Using your circuit schematics for half adder and half subtractor, build the circuits step-by-step, following the Digital Circuit Suggestions document given in Moodle and recommendations above. Connect the inputs to switches on the logic board. Connect the outputs of your logic circuits to LEDs on the logic board. Don't forget to connect VCC power and GND ground to the VCC and GND pins of IC packages.
(3) Make a test probe by connecting another LED on the logic board to one end of a long wire, whose other end will be used to touch circuit points and “see” the logic values. A full voltage level ~5 V will cause the LED to shine brightly; a 0 V level will not light up the LED. A low light output from the LED means that the voltage being sensed is in between logic 0 and logic 1, meaning something is WRONG with your circuit.
(4) Now draw the truth tables for the 2-input 2-output logic circuits that you have made and fill in the left-hand (input) side in standard binary counting order. For each row, apply the input combinations by adjusting the switches, and measure the output. Use this information to complete the truth table, filling in the right-hand (output) side.
(5) Compare your measured truth tables that you obtained from the circuits, with the ones given below. If there are no discrepancies, then it means that your logic circuits have worked as predicted. Ask the TA or Tutor to come and verify this. When the TA or Tutor has checked your circuits, you are done with this part.
Figure 5: Truth table of a half adder Figure 6: Truth table of a half subtractor
Part 2: Building Lab Calculator
(1) Ask the TA or Tutor to come and check your schematic for the lab calculator. Do not proceed to the next step until you have verified that your circuit schematic is correct, and the TA or Tutor has approved it.
(2) Using your circuit schematic, build the circuit following the Digital Circuit Suggestions given in Moodle. Connect the inputs to switches on the logic board. Connect the outputs of your logic circuit to LEDs on the logic board. Don't forget to connect VCC power and GND ground to the VCC and GND pins of IC packages.
(3) As you did in Part 1, test and verify that your built circuit is working correctly as a calculator that produces the outputs of a half adder or half subtractor depending on the value of C input. Compare your measured truth table with the one given below. If there are no discrepancies, then it means that your logic circuit is working correctly, ask the TA or Tutor to come and verify this. When the TA or Tutor has checked your circuit, you are done with this part.
C
A
B
Y
Z
0
0
0
0
0
0
0
1
1
0
0
1
0
1
0
0
1
1
0
1
1
0
0
0
0
1
0
1
1
1
1
1
0
1
0
1
1
1
0
0
Figure 7: Truth table of the Lab Calculator