Introduction: 7400 Quad Nand Gate Simulation

About: Jack passed away May 20, 2018 after a long battle with cancer. His Instructables site will be kept active and questions will be answered by our son-in-law, Terry Pilling. Most of Jack's instructables are tuto…

This is a simulation of a 7400 quad NAND gate chip built with NPN transistors, with plug-in modules to demonstrate how any logic gate can be built using only NAND gates. Logic gates are the building blocks used in all digital electronics.

The NAND gate has two inputs and one output. If both inputs are low the output is high. In any other case the output will be low.

The NAND (not and) gate is a universal gate, any gate can be constructed using only NAND gates. Steps 3 - 9 will illustrate how to make plug in modules to demonstrate all the gates using only NAND gates.

Parts List:

* There are many cheaper perf boards around, but none better.

For more information on logic gates this instructable by Scabolcs shows how to make all the gates using NPN transistors.

Step 1: The Base

Cut a piece of wood 6 1/2x7x3/4 inches for the base.

Place the full size and one quarter size Perma-Proto board on the base as shown in the photo and mark the mounting hole locations.

Drill the mounting holes with a 1/16 drill half inch deep.

Drill out the mounting hole in these two Perma-Proto boards with a 9/64 drill so the #6 screws will fit.

Step 2: Building the 7400

Build the circuit according to the diagram and photo.

Cut the side pin off of the barrel jack as shown in the fourth photo.

The four transistors on the left side of the diagram are soldered with the flats pointing up.

The four transistors on the right side of the diagram are soldered with the flats pointing down.

Cut two pieces of the female header with seven connectors. You lose one connector each time you cut it. Leave enough extra material so you can sand the ends smooth.

Use the wood screws and nylon spacers to mount the finished boards to the base.

The third photo shows the pinouts of the 7400 chip.

Step 3: NAND Gate

The rest of the steps are plug-in modules to show how all of the gates can be made using just NAND (not and) gates. The first module uses the NAND gate as a NAND gate. The NAND gate has two inputs and one output. If both inputs are low the output is high. In any other case the output will be low.

Cut two seven pin pieces of the male headers. Solder them with the pins facing down into holes E1-7 and F1-7. Do this for the boards in all the following steps

Build the circuit as shown in the diagram and photo.

The LED is connected with the anode (the long wire) going to the output pin (A3) and the cathode going to the ground rail.

The third and forth photos are the truth table and schematic symbols for the NAND gate.

Step 4: NOT Gate

This module is a NOT gate built from a NAND gate. The NOT gate is sometimes called an inverter. A high input is switched low and a low input goes high. To build a NOT gate from a NAND gate all you need to do is tie the two inputs together.

Build the circuit from the diagram and photo.

The third and forth photos are the truth table and schematic symbols for the NOT gate.

The fifth photo shows the schematic for a NOT gate built from a NAND gate.

Step 5: AND Gate

This module is an AND gate built from two NAND gates. The AND gate is low unless both inputs are high. To build an AND gate from NAND gates you connect the output from a NAND gate to a NOT gate to invert the output.

Build the circuit from the diagram and photo.

The third and forth photos are the truth table and schematic symbols for the AND gate.

The fifth photo shows the schematic for an AND gate built from NAND gates.

Step 6: OR Gate

This module is an OR gate built from three NAND gates. The OR gate is low until one or both inputs go high. To build an OR gate from NAND gates you connect the inputs of two NAND gates together to make two NOT gates and connect the outputs to a third NAND gate.

Build the circuit from the diagram and photo.

The LED is connected with the anode (long lead) in hole location J-7 and the cathode in J-8.

The third and forth photos are the truth table and schematic symbols for the OR gate.

The fifth photo shows the schematic for an OR gate built from NAND gates.

Step 7: NOR Gate

This module is an NOR (not or) gate built from four NAND gates. The NOR gate is high until one or both inputs go high. To build an NOR gate from NAND gates you connect the inputs of two NAND gates together to make two NOT gates and connect the outputs to a third NAND gate. Just like in the previous step. Then you add another not gate on the end to invert the results.

Build the circuit from the diagram and photo.

The third and forth photos are the truth table and schematic symbols for the NOR gate.

The fifth photo shows the schematic for a NOR gate built from NAND gates.

Step 8: XOR Gate

This module is an XOR (exclusive or) gate built from four NAND gates. The XOR gate is high only if one input is high. If none or both inputs are high the output is low. The inputs from the first NAND gate are connected to one input on the second and third NAND gates. The output from the first NAND gate is connected to the other input on the second and third NAND gate. The outputs from the second and third NAND gates are connected to a fourth NAND gate.

Build the circuit from the diagram and photo.

The third and forth photos are the truth table and schematic symbols for the XOR gate.

The fifth photo shows the schematic for an XOR gate built from NAND gates.

Step 9: XNOR Gate

This module is an XNOR (exclusive not or) gate built from five NAND gates. The XNOR gate is low only if one input is high. If none or both inputs are high the output is high. Since this requires five gates you will need to build one additional NAND gate. The fifth gate is a NAND gate wired as a NOT gate to invert the results.

Build the circuit from the diagram and photo.

The third and forth photos are the truth table and schematic symbols for the XNOR gate.

The fifth photo shows the schematic for an XNOR gate built from NAND gates.