Logic gates are the fundamental building blocks of digital electronics. Alexander Sorokopud / Getty ImagesIf you’ve gone through the Mytour article on Boolean logic, you already know that digital devices rely on Boolean gates. From that article, you also learned that one method of implementing gates uses relays. However, no modern computer utilizes relays—it operates with "chips."
What if you're eager to experiment with Boolean gates and chips? What if you'd like to build your own digital devices? It's actually easier than you might think. In this article, we'll guide you on how to experiment with all the gates discussed in the Boolean logic article. We’ll discuss where you can find the components, how to wire them together, and how to observe their functions. In doing so, you’ll open the door to a vast new world of technology.
Preparing the Scene
A breadboard without solderingIn the article How Boolean Logic Works, we explored seven core gates, which are the fundamental components of all digital devices. We also discussed how to combine these gates into more advanced functions like full adders. If you’re eager to experiment with these gates and test them out for yourself, the simplest method is to buy TTL chips and quickly wire them on a device known as a solderless breadboard. Let’s dive into the technology and the steps so you can get hands-on with it!
Looking back at the evolution of computer technology, it’s clear that all computers are built on Boolean gates. However, the technologies used to create these gates have changed significantly over time. The first electronic gates were constructed using relays, which were slow and bulky. These were replaced by vacuum tubes, which were faster but still large and prone to burnout (like light bulbs). The breakthrough came with the invention of transistors in 1947, which led to computers using gates made from discrete transistors. These transistors had many benefits: high reliability, low power consumption, and small size compared to relays or tubes. Discrete transistors were individual units, each encased in a small metal can the size of a pea, with three attached wires. It often took three or four transistors along with resistors and diodes to form a gate.
In the early 1960s, the invention of integrated circuits (ICs) revolutionized technology. Now, transistors, resistors, and diodes could all be etched together on a single silicon "chip." This led to the creation of SSI (small scale integration) ICs. An SSI IC typically consists of a 3-mm-square silicon chip containing around 20 transistors and other components. These chips could house four to six individual gates. This innovation reduced the size of computers by a factor of 100 and made them far easier to construct.
As chip manufacturing technology advanced, the number of transistors that could be etched onto a single chip increased. This led to the creation of MSI (medium scale integration) chips that contained simple components like full adders, made from multiple gates. Later, LSI (large scale integration) enabled the integration of all the components of a basic microprocessor onto a single chip. The 8080 processor, introduced by Intel in 1974, was the first commercially successful microprocessor to be integrated on one chip. It was an LSI chip containing 4,800 transistors. Since then, VLSI (very large scale integration) has continued to increase the number of transistors. The first Pentium processor, released in 1993, had 3.2 million transistors, and modern chips can now contain up to 20 million transistors.
To experiment with gates, we’ll step back in time and work with SSI ICs. These chips are still readily available, very reliable, and inexpensive. You can create anything you desire with them, one gate at a time. The specific ICs we will use are part of a family known as TTL (Transistor-Transistor Logic), named for the particular wiring of the gates on the IC. The chips in the 7400 series of TTL are among the most common. The series includes around 100 different SSI and MSI chips, ranging from simple AND gates to complete ALUs (arithmetic logic units).

The 7400-series chips come in DIPs (dual inline packages). As shown in the image, a DIP is a small plastic package with 14, 16, 20, or 24 metal pins sticking out to provide connections to the gates inside. The easiest way to build something with these gates is by placing the chips onto a solderless breadboard. The breadboard allows you to wire everything together simply by plugging wires into the board’s connection holes.
Every electronic gate requires a power source. TTL gates use 5 volts for operation. These chips are quite specific about their voltage needs, so we’ll use a clean, regulated 5-volt power supply when working with TTL chips. Other chip families, such as the 4000 series of CMOS chips, are less strict about their voltage requirements. CMOS chips also consume much less power. However, they are highly sensitive to static electricity, making them less reliable unless you have a static-free environment. Therefore, we’ll stick with TTL for this experiment.
Setting Up Your Tools
An LED and a resistorTo experiment with TTL gates, you will need a few key pieces of equipment. Here's a list of items you’ll want to gather:
- A breadboard
- A volt-ohm meter (also called a multimeter)
- An optional logic probe
- A regulated 5-volt power supply
- A set of TTL chips for your experiments
- Multiple LEDs (light emitting diodes) to observe the gates' outputs
- A variety of resistors for the LEDs
- Some wire (20 to 28 gauge) to connect everything
Altogether, these components should cost between $40 and $60, depending on where you purchase them from.
Let’s go over some details about these components to help you get more comfortable with them:
- As explained on the previous page, a breadboard is a convenient tool that simplifies the wiring of your circuits.
- A volt-ohm meter allows you to easily measure voltage and current. We will use it to ensure that our power supply is delivering the correct voltage.
- The logic probe is optional. It makes it simple to check whether a wire is in state 1 or 0, but you can achieve the same result using an LED.
- Out of the components mentioned, the 5-volt power supply is the trickiest to find. Unfortunately, there's no easy way to buy a cheap, simple 5-volt regulated power supply. So, you have two options: You can either buy a surplus power supply (like one from a video game) and use its 5-volt output, or you can use a power-cube transformer and build the regulator yourself. We'll go over both approaches.
- An LED (light emitting diode) is a small light source. It's used to display the output of a gate.
- We will use resistors to protect the LEDs. Without them, the LEDs will burn out instantly.
This type of equipment isn't the kind of thing you'll find at a regular store, but it's still fairly easy to get your hands on these components. You have several options for purchasing the parts listed above:
- Radio Shack
- Local electronics parts stores - Many large cities have stores that specialize in electronics, and some cities even have excellent surplus electronics shops. If you're lucky enough to find one that caters to people building their own projects, you've found a real treasure.
- Mail-order suppliers like Jameco - Jameco has been in business for many years, offering a reliable inventory and competitive prices. (Be sure to download their PDF catalog or request a paper catalog to make browsing their website easier.)
Notes
- *Jameco also sells "assorted LEDs" (also known as grab bags) that are much cheaper per LED. Take some time to see what's available. Surplus electronics stores tend to have much better deals on items like these.
- If you plan on shopping at Jameco, it's a good idea to purchase two or three of each chip, just in case. They're only about 30 cents each. You might also want to buy an extra 7805 or two.
- You'll also need a pair of wire cutters and wire strippers. You can get by using scissors and your nails, but the proper tools will make your life much easier. You can find wire cutters and wire strippers at Jameco, Wal-Mart, Radio Shack, and many other retailers. A small pair of needle nose pliers can also be helpful from time to time.
The Power Supply
For working with TTL chips, you'll definitely need a regulated 5-volt power supply. As mentioned earlier, neither Radio Shack nor Jameco seems to have a standard, affordable 5-volt regulated power supply available. One option is to purchase something like part number 116089 from Jameco, which is a 5-volt power supply from an old Atari video game. Jameco carries about 20 different surplus power supplies like this, each producing various voltages and amperages. You need 5 volts at a minimum of 0.3 amps (300 milliamps), but not more than 2 amps, so avoid buying a power supply that's more powerful than necessary. To use it, you can simply buy the power supply, cut off the connector, and access the 5-volt and ground wires. This method works just fine, and using your volt meter (as mentioned earlier) will ensure you're getting the proper voltage from the supply.
Alternatively, you can build your own 5-volt supply using a power-cube transformer. For this option, you'll need a transformer that outputs 7 to 12 DC volts at 100 milliamps or more. Keep in mind the following details:
- The transformer must output DC voltage.
- The output must be between 7 and 12 volts.
- The transformer must provide at least 100 milliamps (0.1 amps).
You might already have an old transformer lying around that fits these requirements—just check the imprint on the cover to ensure it meets all three criteria. If not, you can always pick up a transformer from Radio Shack or Jameco.
Radio Shack carries a 9-volt, 300-milliamp transformer (part number 273-1455), while Jameco offers a 7.5-volt, 300-milliamp version (part number 149964). Start by cutting off the connector from the transformer and separating the two wires. Strip about a centimeter of insulation from each wire. Once that's done, plug in the transformer. However, make sure the two wires never touch each other once plugged in, as doing so could damage the transformer. Use your volt meter (explained below) to check the voltage. Ensure the transformer is delivering approximately the specified voltage—it's okay if it’s up to twice as high. Also, it’s important to identify which wire is positive and which is negative. To do this, connect the black and red leads of the volt meter to the transformer wires at random and check the voltage. If it's negative, reverse the leads. Once you do this, you'll know the black lead connects to the negative (ground) wire, and the red one to the positive wire.
A volt-ohm meter (also called a multimeter) measures voltage, current, and resistance. It consists of two "leads" (wires): one black and one red. For now, we’ll focus on measuring voltage. To do this, grab a AA, C, or D battery (make sure it's not dead). We'll use the battery as a voltage source.
Although every meter is different, here are general steps to set up for measuring the battery's voltage:
- Insert the black test lead into the hole marked (depending on the meter) "Common," "Com," "Ground," "Gnd," or "-" (minus).
- Insert the red test lead into the hole labeled (depending on the meter) "Volts," "V," "Pos," or "+" (plus). Some meters have multiple red lead holes—make sure to use the one for volts.
- Turn the dial to the "DC Volts" section. There will usually be several voltage ranges to choose from—on my meter, the options are 2.5 volts, 50 volts, 250 volts, and 1,000 volts (fancier meters may automatically select the range). Since the battery has about 1.25 volts, select the closest higher range (in my case, 2.5 volts).
Next, hold the black lead to the battery's negative terminal and the red lead to the positive terminal. You should get a reading close to 1.25 volts on the meter. It’s crucial to always connect the black lead to negative and the red lead to positive. Once you're comfortable with this, you can use the meter to check your power supply. If necessary, adjust the voltage range and connect the black lead to ground and the red lead to the 5-volt wire. The meter should show 5 volts.
Building the Regulator
To construct the regulator, you'll need three components:
- A 7805 5-volt voltage regulator in a TO-220 package (Radio Shack part number 276-1770)
- Two electrolytic capacitors, anywhere between 100 and 1,000 microfarads (a typical Radio Shack part number is 272-958)
The 7805 is designed to take an input voltage ranging from 7 to 30 volts and reduce it precisely to 5 volts. The first capacitor smooths out any fluctuations from the transformer, ensuring that the 7805 receives a clean, steady input voltage. The second capacitor helps maintain a consistent output by balancing the load, ensuring the 7805 provides a stable 5-volt output.
The 7805 has three pins. From left to right, they are the input voltage pin (accepting 7 to 30 volts), the ground pin, and the output voltage pin (which provides 5 volts).Looking at the 7805 from the front (where the printed markings are), you'll see three pins. From left to right, they represent input voltage (7 to 30 volts), ground, and output voltage (5 volts).
To connect the regulator to the transformer, you can use this setup for proper wiring.The two capacitors are depicted by parallel lines. The "+" sign indicates that electrolytic capacitors are polarized, meaning they have a positive and a negative terminal (one of which is marked). It’s crucial to install them with the correct polarity for them to function properly.
You can assemble this regulator on your breadboard. To do so, you must first understand the internal wiring of a breadboard.
At the outer edges of the breadboard, there are two continuous lines of terminals that run the entire length of the board. These terminals are all interconnected. Typically, one of these is used for +5 volts and the other for ground. Running down the center of the board is a channel, with sets of five interconnected terminals on either side. You can use your volt-ohm meter to check the interconnections. Set the meter to the ohm setting, and use wires to probe different points on the breadboard (the meter's test leads may be too thick to fit directly into the breadboard's holes).
In the ohm setting, the meter measures resistance. A resistance of zero means the two points are connected (you can verify this by touching the leads together), and infinite means there is no connection (verify this by holding the leads apart). You will observe that the points on the breadboard are indeed interconnected as shown in the diagram. Alternatively, you can pull back the sticker on the back of the breadboard to inspect the metal connections.
Next, connect the components for your regulator:
- Attach the ground wire from the transformer to one of the long outer strips on the breadboard.
- Insert the 7805 into three of the five-hole rows.
- Run a wire from the ground terminal strip to the middle lead of the 7805 -- cut a short piece of wire, strip the ends, and plug them in.
- Connect the positive wire from the transformer to the left lead (input) of the 7805.
- Place a capacitor between the left lead of the 7805 and ground, ensuring the correct polarity.
- Connect the 5-volt lead from the 7805 to the other long outer terminal strip on the breadboard.
- Wire the second capacitor between the 5-volt and ground strips.
You’ve successfully built your regulator. It should look something like this when you finish (shown from two different perspectives):


In both illustrations, the transformer’s wires enter from the left side. The ground line from the transformer is directly connected to the ground strip that runs along the bottom of the board. The top strip provides +5 volts, which connects straight to the +5 pin of the 7805. The left capacitor smooths out the transformer’s voltage, while the right capacitor stabilizes the +5 volts output by the 7805. The LED is wired between the +5 and ground strips, with a resistor in between, indicating when the power supply is active.
Plug in the transformer and check the input and output voltages from the 7805. You should see exactly 5 volts coming out from the 7805 and the same voltage as the transformer’s input. If the voltages do not match, disconnect the transformer immediately and follow these steps:
- Remove the capacitors and reconnect the transformer briefly to check if that alters anything.
- Ensure the ground and positive wires from the transformer are connected properly (if reversed, the 7805 could become very hot and may be damaged).
- Verify that the transformer is producing voltage by disconnecting it and testing it with your voltmeter. See the previous page for detailed instructions.
Once you confirm that the regulator is producing 5 volts, you can further test it by attaching an LED to ensure it is working. Connect the LED and a resistor in series—this is simple to do on your breadboard. The resistor is necessary; without it, the LED will burn out immediately. A 330-ohm resistor is ideal, but any resistor between 200 and 500 ohms will work fine. Since LEDs are diodes and have polarity, if the LED doesn’t light up, try reversing the leads to check if that solves the problem.
It may seem like we’ve gone through quite a bit of effort just to get the power supply set up and functioning. But in the process, you’ve learned a few essential concepts. Now, we’re ready to dive into experimenting with Boolean gates!
Exploring Boolean Gates



If you followed the parts list from the previous page, you should now have six different chips, each containing a distinct type of gate:
- 7400 - NAND (four gates per chip)
- 7402 - NOR (four gates per chip)
- 7404 - NOT (six gates per chip)
- 7408 - AND (four gates per chip)
- 7432 - OR (four gates per chip)
- 7486 - XOR (four gates per chip)
In the diagram, the chip receives +5 volts on pin 14 (indicated by the red wire) and ground on pin 7 (indicated by the black wire). The resistor extends from pin 3 to the LED, which is also connected to ground. To test the gate, connect wires from +5 volts and ground to the A and B inputs of the gate.Let's begin by working with a 7408 AND chip. You'll typically find a dot or an indentation on pin 1 of the chip to help identify it. Insert the chip into the breadboard so it spans across the center channel. The diagrams show that, for all chips, pin 7 should be connected to ground and pin 14 to +5 volts. Be sure to connect them correctly—incorrect connections may damage the chip, so double-check to avoid this. If a chip gets damaged, dispose of it to avoid confusion with functioning components. Now, connect an LED and a resistor between pin 3 of the chip and ground, and the LED should light up. If it doesn’t, try reversing the LED to make it work. This is what your setup should look like:
Here’s what’s happening: In TTL logic, +5 volts represents a binary "1", and ground is a binary "0". If an input pin on a gate is left unconnected, it will "float high", meaning the gate assumes that a 1 is present. This results in both A and B inputs of the AND gate seeing 1s, which causes the output on pin 3 to provide 5 volts, turning on the LED. If you ground either pin 1 or 2 (or both), the LED will turn off. This is the typical behavior of an AND gate, as explained in How Boolean Logic Works.
Experiment with other gates by setting them up on your breadboard and observing their behavior according to the logic tables in the Boolean logic article. Once you're comfortable with the basics, try wiring more complex circuits. For instance, set up the XOR gate, or connect the Q bit of the full adder, and confirm that they work as expected.
Build It!
With the knowledge you've gained, you’re now equipped to build any digital device. You can take the basic gates covered in this article and create complex systems. However, for efficiency, it’s often more practical to use larger components instead of combining many smaller chips to build something like an ALU. It’s also useful to explore different methods of combining gates to design sophisticated systems.
If you're interested in tackling a larger project, try constructing the digital clock explained in How Digital Clocks Work. To deepen your understanding of TTL devices, the following books will be invaluable:
You'll be ASTOUNDED by the incredible things you can create with just a few ICs and a spark of creativity. Enjoy the journey and have fun experimenting!
