0% found this document useful (0 votes)
31 views4 pages

Lab 1: Binary Numbers and Logic Gates

This lab covers basic concepts of binary numbers and logic gates. Students will connect binary switches to LED displays to represent numbers from 0 to 15 in binary. They will then connect the binary inputs to a 7-segment display to show the decimal equivalent. Truth tables will be made for AND, OR, and NAND gates. Universal gates will be constructed using NANDs and NORs, with truth tables measured to verify functionality.

Uploaded by

Fatmir Kelmendi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views4 pages

Lab 1: Binary Numbers and Logic Gates

This lab covers basic concepts of binary numbers and logic gates. Students will connect binary switches to LED displays to represent numbers from 0 to 15 in binary. They will then connect the binary inputs to a 7-segment display to show the decimal equivalent. Truth tables will be made for AND, OR, and NAND gates. Universal gates will be constructed using NANDs and NORs, with truth tables measured to verify functionality.

Uploaded by

Fatmir Kelmendi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab 1: Binary Numbers and Logic Gates

1.1 General Lab Introduction

All relevant data, calculations, observations, and responses to questions in the lab handouts should be recorded in a lab notebook, which ideally should be a hardcover notebook containing quadrille paper. Prelab writeups are not required, although they might be useful. All material to be turned in should be included in the lab notebook. Label your notebook entries with the corresponding section number from the handout. The notebooks will be due a few days after the lab class, as speci ed by your T.A. There should be one student per lab station, and it is expected that all students become familiar with electronics techniques. An introduction to basic concepts of binary numbers, logic gates, and familiarization with some lab tools. We will be working with integrated circuit chips ICs. Here are a few rules to follow: Always turn o the power on your prototyping board before inserting any ICs. Be careful to avoid reversing power connections. Typically we only need +5 V and 0 V ground connections for digital circuits. Ask your T.A. for help with setting up power busses on your prototype board if in doubt. We will primarily be using TTL circuitry. Do not connect TTL outputs together, as the resulting circuit will not work. Also, unconnected TTL inputs will usually oat" up to the high level. However, it is not good practice to count on this property, and pull-up" resistors connected to +5 V should be used to maintain a high input.

1.2 Goals of this Lab

1.3 Binary Generation and Translation


As a simple exercise in binary generation, connect four of the DIP dual in-line package switches to four LED logic indicators on your prototype board. Make each connection as shown in Fig. 1. The DIP switches are set up to choose either ground or open. The pull-up resistor should be in the range 100 to 5k , but the exact value should not be important. Check that the LEDs respond as expected to the switch positions. Verify that the four LEDs can be used to represent 16 digits numbered from decimal 0 to 15.
 

1.3.1

+5 V

1k DIP switch LED 1 7-segment 1

Figure 1: One of four DIP switch to logic LED connections. Also shown dashed is the connection to one input of the 7-segment circuit.
1.3.2

The four bits can be encoded and displayed as a decimal digit using the circuit sketched in Fig. 2. The 7-segment chip consists of seven LEDs which can be combined to display decimal digits. The display is oriented correctly when the decimal point is at the bottom. The 7447 IC is a binary BCD to 7-segment decoder see attached description. These two chips have been conveniently wired up for us on separate small circuit boards. Connect up this circuit using your four bits as the inputs. Wire these inputs in parallel with the previously used logic LEDs, as shown for one of the four bits in Fig. 1, so that binary LEDs and decimal display can both be observed.
binary (BCD) input 4 bits 7 outputs (a-g)

a0 a1 a2 a3

7447

7-segment display circuit board

Figure 2: Conceptual schematic of the small 7-segment display boards. Make a truth table as shown below. Cycle through all switch combinations and complete the table. What do you observe on the 7-segment display for binary inputs larger than 1001 ? Does it produce the hexadecimal digits A|F ? Binary Number Binary Display Expected Decimal Observed Decimal 0000 o -o -o -o 0 ? to 1111 2

1.4 TTL Logic Gates

We will explore some standard logic gate ICs. Figure 3 indicates the pin assignments and function of a number of standard logic ICs. Detailed speci cations can be found in the data books in the lab room, although it is not likely to be needed here.

Figure 3: Pin assignments for standard TTL logic chips. Output states can be measured with an oscilloscope or logic probe. Begin by using the oscilloscope. For those students unfamiliar with its use, please read Appendix A of the text and ask for help from your T.A. and your neighbors. Since we are measuring DC levels, use the p-p auto" trigger setting and make sure the channels are DC coupled. Use a 10 scope probe. If you have time, feel free to try out a logic probe.


Apply HIGH and LOW inputs to one of the AND gates of the 7408. Measure the corresponding outputs and make a truth table. Repeat these steps for one 7432 OR gate and for one 7400 NAND gate.
1.5.1

1.5 Truth Tables

Join the two inputs of the NAND gate so that the gate has a single input. What is the function of this gate?
1.5.2

Connect the ends of your 1 k variable resistor to +5 V and ground. The voltage from the center tap can now be varied. Connect the variable voltage to the input of the NAND with single-input you constructed in 1.5.1. Record the output as a function of input voltage. Are the results consistent with page 475 of the text?

1.6 Universal NORs and NANDs


1.6.1

Using only NAND gates from the 7400, construct an OR gate. Verify its function by measuring the truth table. Using only NOR gates from the 7402, construct an AND gate. Measure the truth table.
1.6.2

Measure the truth table for a 7486 XOR gate. Now construct an XOR gate using the four NAND gates of a 7400. Recall that the relevant logic expression for this construction is

Q = A AB


B AB


You might also like