Lab 7: Digital Gates



We are now preparing to leave the analog world and move into digital territory. This is a place where, thanks to transistors and op-amps and the like, we will no longer worry about input and output impedances, and will start dealing only with ones and zeroes. In this lab we will look at how to make the gates work properly and what makes them tick, before going fully digital.


New Tools

For this lab, and the ones that remain, you will using some new parts of the breadboard and probes to help you observe the workings of the digital gates. The Slide Switch will be used to provide either 0 V or +5 V. Simply connect one side of the switch to the +5 V line of the breadboard and the other to ground. The selector switch will choose to which side the output is connected. To make sure the switch is working properly you can test it by using the digital logic probe and verifying that you observe the expected output. Alternatively, you can use the LEDs of the breadboard. The Digital Logic Probe can be used to test different parts of the circuit. It is in the shape of a pen, and if properly powered (it needs a reference +5 V and ground), lights up “high” or “low”. Remember, if neither light is on, this means your output is not in a well-defined digital state. You will not need voltages that exceed 5 V in this lab, and for the survival of your chip, you shouldn’t want to.


2 . For the CMOS part tie all six unused input lines to a common line. and the voltages with voltmeter measured values. The TTL part is 74SL00 and the CMOS part is 74CH00. 14 VCC (+5V) 13 12 11 10 9 8 1 2 3 4 5 6 GND 7 Figure 1: TTL and CMOS chip pinout.3 3. They both have the same pinout which is shown in Figure 1. Question 1 Complete the following truth table and voltage list for the TTL and CMOS NAND gates: INPUT OUTPUT 0 0 1 1 0 1 0 1 VOLTAGES TTL CMOS Table 1: Fill out the OUTPUT column with logic values 1 or 0.1 Input and Output Characteristics of Integrated Gates Vout You will begin by testing two different types of NAND gates: CMOS and TTL. and temporarily ground that line.

As you may suspect there isn’t a unique way to setup the NAND gates 3 . The truth table of the XOR gate is shown in Table 2. We will now do the same to the inputs of the TTL and CMOS NAND gates.2 Floating Input While doing a lab on JFETs you observed what happens when you let the gate of a MOSFET float. what logic level did you observe at the output in this case? Refer to Figure 2 and explain why this is the expected result. Question 2 For the TTL circuit. and note the output logic level.3. Why does the CMOS NAND draw such high current in this case? (refer to Figure 4 to see how the CMOS NAND is built) The NAND gate is the most useful gate in that any logic operation can made by a combination of NANDs. Question 3 When you connected the set of CMOS NAND circuits as in Figure 3. however this time. Use the mA scale on your voltmeter and measure the current as you go from one well-defined logic level to another. Disconnect both inputs to the NAND. wire up the circuit shown in Figure 3. you probably saw non-negligible currents on the milliammeter yet CMOS circuits are supposed to be useful because of their low operating current. A Q B Figure 2: The TTL NAND gate. with (of course) a not-so-well-defined level in between. We now try the same experiment for the CMOS NAND gates. One such operation is the XOR (exclusive OR) gate.

+5 14 +5 10k 7 Figure 3: A circuit to explore the consequences of floating CMOS inputs +5 V Q A B Figure 4: The CMOS NAND gate circuit diagram. 4 . Question 4 Design an XOR gate using 5 NANDs and then 4 NANDs. in order to produce an XOR. Hint: For the 4-NAND version the output of one of the NANDs can be reused.

Be sure to tie the two body connections appropriately: pin 14 to +5 V. Again. Start with a frequency in the 1 kHz range and work your way up to the 100 kHz range. pin 7 to ground. 4 Inverters In the following experiments you will use two CD4007 packages. The pinout is shown in Figure 5. 14 2 11 6 13 8 3 1 10 5 12 7 4 9 Figure 5: CMOS pinout. as the logic probe will not do. This part is an array of complementary MOS transistors. Wire up the circuit in Figure 6. Watch the output on the scope. Confirm that this circuit does indeed invert by driving it with a TTL level from the breadboard oscillator pulled up to +5 V through a 1 kΩ resistor. drive it with the same TTL waveform from your breadboard with the same frequencies. Now wire up the active pullup inverter circuit shown in Figure 7. 5 .A B 0 0 0 1 1 0 1 1 Out 0 1 1 0 Table 2: The XOR truth table.

We can however introduce a third state: off. Qup and Qdown refer to the pull-up and pull-down transistors. and you will be able to switch its output to the OFF state. The trick is to add some logic in order to turn off both the pull-up and pull-down transistors such that the 6 . This state becomes very useful in computers: it allows multiple drivers to share a single driven wire. high and low. Question 5 Make a quick sketch of Vout vs f for both frequency ranges and for both inverters. or bus line. Here you will build a buffer (a gate that does nothing except give a fresh start to a signal). A block diagram of the three-state buffer is shown in Figure 8.+5 V 8 6 7 Figure 6: The simplest inverter: passive pullup. or 5 V to 0 V? Why? Was the speed improved for the active pull-up circuit of Figure 7? 5 CMOS Three-State Thus far you’ve seen two well-defined digital states. Which transition is faster: 0 V to 5 V. +5 V 14 6 13 8 7 Figure 7: An active pullup inverter.

i. The slide switch can be set to ground or +5 V. Use another slide switch to control the “enable”. Observe the output on the scope. while the output is tied to a 100 kΩ resistor driven from a slide switch. which leaves the output floating. V+ Q up in Logic Q down enable out Figure 8: A block diagram of the three-state buffer. Question 6 How is the third state (disconnected) in Figure 9 achieved.output is disconnected from both +5 V and ground. what happens to the MOSFETs? Does the 3-state disappear electrically. Wire the circuit +5 V in out enable Figure 9: A 3-state circuit design. up and test it by driving the input with the breadboard oscillator. when you disable the gate? 7 .e. A design for the three-state circuit is shown in Figure 9.

(Your circuit should also be as simple as possible).6 A small design problem Question 7 Draw a diagram of some logic circuit that will light an LED if either or both the left and right door of a car are open and if the driver is seated. and that only NAND gates are available. 8 . Assume that the doors and seat are equipped with switches.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.