# How Electronic Gates Work

by Marshall Brain

If you have read the HowStuffWorks article on Boolean logic, then you know that digital devices depend on Boolean gates. You also know from that article that one way to implement gates involves relays. However, no modern computer uses relays -- it uses "chips."

What if you want to experiment with Boolean gates and chips? What if you would like to build your own digital devices? It turns out that it is not that difficult. In this article, you will see how you can experiment with all of the gates discussed in the Boolean logic article. We will talk about where you can get parts, how you can wire them together, and how you can see what they are doing. In the process, you will open the door to a whole new universe of technology.

Setting the Stage
In the article How Boolean Logic Works, we looked at seven fundamental gates. These gates are the building blocks of all digital devices. We also saw how to combine these gates together into higher-level functions, such as full adders. If you would like to experiment with these gates so you can try things out yourself, the easiest way to do it is to purchase something called TTL chips and quickly wire circuits together on a device called a solderless breadboard. Let's talk a little bit about the technology and the process so you can actually try it out! If you look back at the history of computer technology, you find that all computers are designed around Boolean gates. The technologies used to implement those gates, however, have changed dramatically over the years. The very first electronic gates were created using relays. These gates were slow and bulky. Vacuum tubes replaced relays. Tubes were much faster but they were just as bulky, and they were also plagued by the problem that tubes burn out (like light bulbs). Once transistors were perfected (transistors were invented in 1947), computers started using gates made from discrete transistors. Transistors had many advantages: high reliability, low power consumption and small size compared to tubes or relays. These transistors were discrete devices, meaning that each transistor was a separate device. Each one came in a little metal can about the size of a pea with three wires attached to it. It might take three or four transistors and several resistors and diodes to create a gate.

There are perhaps 100 different SSI and MSI chips in the series. ranging from simple AND gates up to complete ALUs (arithmetic logic units). and current chips can contain up to 20 million transistors. These chips shrank the size of computers by a factor of about 100 and made them much easier to build. Then LSI (large scale integration) allowed designers to fit all of the components of a simple microprocessor onto a single chip. The first Pentium processor was released in 1993 with 3. You can build anything you want with them. This led to MSI (medium scale integration) chips containing simple components. An SSI IC typically consists of a 3-mm-square chip of silicon on which perhaps 20 transistors and various other components have been etched." This discovery gave rise to SSI (small scale integration) ICs. 20 or 24 little metal leads protruding from it to provide connections to the gates inside. was the first commercially successful single-chip microprocessor. As chip manufacturing techniques improved. The 8080 processor. such as full adders. made up of multiple gates. resistors and diodes could be manufactured together on silicon "chips. The breadboard lets you wire things together simply by plugging pieces of wire into connection holes on the board. A solderless breadboard . It was an LSI chip that contained 4. A typical chip might contain four or six individual gates. a DIP is a small plastic package with 14. Transistors. named for the specific wiring of gates on the IC). one gate at a time. As pictured on the right. The 7400-series chips are housed in DIPs (dual inline packages). called the 7400 series. The easiest way to construct something from these gates is to place the chips on a solderless breadboard.2 million transistors. released by Intel in 1974.800 transistors. integrated circuits (ICs) were invented. 16.In the early 1960s. The specific ICs we will use are of a family called TTL (Transistor Transistor Logic. we are going to go back in time a bit and use SSI ICs. These chips are still widely available and are extremely reliable and inexpensive. more and more transistors could be etched onto a single chip. VLSI (very large scale integration) has steadily increased the number of transistors ever since. In order to experiment with gates. The chips we will use are from the most common TTL series.

(Be sure to download their PDF catalog or get a paper catalog from them -. 300ma) 7805 5-volt voltage regulator (TO-220 case) 2 470-microfarad electrolytic capacitors Jameco # 149964 51262 93817 Notes • • • *Jameco also has "assorted LEDs" (or grab bags) that are much cheaper on a perLED basis. has a good inventory and good prices. You will also need a pair of wire cutters and wire strippers. If you are shopping at Jameco. If you can find a good surplus store in your area that caters to people building their own stuff. Look around and see what's available. you may want to get two or three of each chip just in case -. but having the proper tool makes it easier. A local electronics parts store .Most major cities have electronics parts stores. You might also want to purchase an extra 7805 or two. You can get .2.Jameco has been in business for decades. then you have found a goldmine. This is one place where a surplus electronics shop will have much better prices. with Jameco part numbers listed.) The following table shows you what you need to buy. 3. you can use scissors and your fingernails.they only cost about 30 cents each. and many cities are blessed with good surplus electronics stores. In a pinch. A mail-order house like Jameco .it makes it much easier to traverse the Web site. Part Breadboard Volt-ohm meter Logic probe (optional) Regulated 5-volt power supply 7400 (NAND gates) 7402 (NOR gates) 7404 (NOT gates) 7408 (AND gates) 7432 (OR gates) 7486 (XOR gates) 5 to 10 LEDs 5 to 10 330-ohm resistors Wire (20 to 28 gauge) Jameco # 20722 119212 149930 See below 48979 49015 49040 49146 50235 50665 94529* 30867 36767 For the Power Supply (optional) (See next section for details) Part Transformer (7 to 12 volts.

The 7805 has three leads. You need to make sure you get the polarity right when you install the capacitor. input voltage (7 to 30 volts). and the second capacitor acts as a load balancer to ensure consistent output from the 7805. You can build this regulator on your breadboard. To connect the regulator to the transformer. The following figure shows you the wiring: . the three leads are. you need to understand how a breadboard is internally wired. The "+" sign indicates that electrolytic capacitors are polarized: There is a positive and a negative terminal on an electrolytic capacitor (one of which will be marked).transformer so that the 7805 is receiving a smooth input voltage. and output voltage (5 volts). To do this. ground. If you look at the 7805 from the front (the side with printing on it). you can use this configuration: The two capacitors are represented by parallel lines. from left to right.