Lab04 Preparation Task
Lab04 Preparation Task
You should complete three circuit schematic diagrams as listed below before your week 3 Lab
4 session. Refer to the week by week teaching outline on Blackboard to see when is your lab 4
session. You should consult the device pinout information on Blackboard (under learning
resources>>lab resources digital logic).
Circuit 1
Draw a circuit schematic diagram for a 2-to-1 multiplexer that uses only 2-input NAND gates.
The data inputs should be connected to push buttons. The select input should be connected to
a switch. The output should be connected to an LED.
Hint: Do the truth table (or a function table) for a 2-to-1 multiplexer, obtain the logic
expression, then draw a logic circuit and convert it to the NAND equivalent circuit by
replacing each gate with its NAND version. If you use Logisim, do not use the MUX module.
Circuit 2
Draw a circuit schematic diagram for a 2-to-4 decoder - using whichever logic gates you
prefer (from those available in the CSSE2010/CSSE7201 lab). The two inputs should be
connected to switches. The outputs should be connected to LEDs.
A 2-to-4 decoder has the following truth table (inputs A1, A0 and outputs X0, X1, X2, X3):
A1 A0 X0 X1 X2 X3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Circuit 3
Using a 74HCT04, 74HCT157 and a 74HCT283, draw a circuit schematic diagram for a circuit
which can act as a 4-bit two's complement adder or subtractor. The output (4-bits from the
74HCT283, which should be shown on LEDs) will have the value A+B or A-B (where A and B
are the 4-bit inputs which are taken from switches). A push button input (M, mode) will
determine whether the circuit performs addition or subtraction - if the value is 0, addition will
be performed; if the value is 1, subtraction will be performed by calculating A+(-B). The
circuit is similar to that shown in week2-lecture 4-slide 7 except the selection of the “B” input
bits as B or not(B) is to be performed using multiplexers instead of XOR gates. (The
74HCT157 is a quad 2-to-1 multiplexer with a shared select input.) The carry output should
be shown on a LED also.