18
EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets ______________________________________________________________ _____________ EEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their Applications Objective The objective of this experiment is to give students hands-on experience on how to use digital ICs, and to demonstrate the principles of logic gates and their applications. Note: There are three different parts in this experiment. They are: 1. Logic gates 2. Half adder design 3. 2-bit full adder design You are required to complete all of them. Preparation Before starting the experiment, make sure that you have the following equipment and components. Equipment 1. DC power supply - 1 Components Refer to appendix for further information 2. Breadboard - 1 3. IC 7408 (quad 2-input AND gate) - 1 4. IC 7486 (quad 2-input XOR gate) - 1 5. IC 7432 (quad 2-input OR gate) - 1 6. Resistors 1.2 K - 3 7. LED - 3 Experiment 1A: Logic Gates Implementation (30 minutes) This part of the experiment will examine the truth table properties of basic logic gates, e.g. AND and XOR gates. The symbols and the truth tables of these logic gates are as shown in Fig. 1.1 and Table 1.1, respectively. Page 1 of 18

EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

Embed Size (px)

Citation preview

Page 1: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

EEE1036: DIGITAL LOGIC DESIGNExperiment 1: Logic Gates and Their Applications

Objective

The objective of this experiment is to give students hands-on experience on how to use digital ICs, and to demonstrate the principles of logic gates and their applications.

Note: There are three different parts in this experiment. They are:

1. Logic gates 2. Half adder design 3. 2-bit full adder design

You are required to complete all of them.

Preparation

Before starting the experiment, make sure that you have the following equipment and components.

Equipment 1. DC power supply - 1

Components Refer to appendix for further information2. Breadboard - 1 3. IC 7408 (quad 2-input AND gate) - 1 4. IC 7486 (quad 2-input XOR gate) - 1 5. IC 7432 (quad 2-input OR gate) - 16. Resistors 1.2 K - 3 7. LED - 3

Experiment 1A: Logic Gates Implementation (30 minutes) This part of the experiment will examine the truth table properties of basic logic gates, e.g. AND and XOR gates. The symbols and the truth tables of these logic gates are as shown in Fig. 1.1 and Table 1.1, respectively.

Fig. 1.1 AND and XOR gates

Page 1 of 13

AB Y

AND

AB

Y

XOR

Page 2: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

Table 1.1: Truth tables

AND gate XOR gateA B Y A B Y0 00 11 01 1

0001

0 00 11 01 1

0110

Experimental Procedures

You can find these logic gates in readymade commercial integrated circuits (ICs). They are also known as chips. Different ICs contain different types of logical functions.

1. TTL IC 7408 contains quad 2-input AND gates 2. TTL IC 7486 contains quad 2-input XOR gates 3. TTL IC 7432 contains quad 2-input OR gates

The pin layouts of these three ICs are given in the appendix of this lab sheet.

Input control

We shall use jumper wires as switches to control gate inputs.

CLOSED circuit (input is connected to ground) is equivalent to logic 0 (logic low)OPEN circuit (input is connected to +5V) is equivalent to logic 1 (logic high)

Output observation

We shall use LEDs to observe circuit outputs.

The actual experimental circuit is shown in Figure 1.2. Construct the circuit using the following steps.

Fig. 1.2 Testing basic logic gates

Page 2 of 13

S1 S2 S3 S4

1

2

1

2

7486

7408

3Y

3Y

1.2K

1.2K

A K

Jumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switchesJumper wires as switches

Page 3: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

Getting ready the power supply: Set the output voltage to +5V. Set the ammeter scale switch to LO (if any). Set the current adjustment knob to about ¼ turn from the min position. Connect the “-“ output terminal to the “GND” terminal. Ask your supervisor if you have any query.

1. Make sure that the power supply is turned off. Connect two jumper wires from the DC power supply's +5V and GND (ground) points to two horizontally connected lines on your breadboard, respectively (refer to appendix).

2. Insert ICs 7486 and 7408 on the breadboard. Note that you will use up to 3 ICs in exp. 1B.2. Distribute your ICs on your breadboard.

3. Please make sure that the IC and other components are placed firmly on the breadboard, otherwise, get a new breadboard from the lab.

4. Construct the circuit as shown in Fig. 1.2.Guidelines for connections:i. Connect pin 7(7486, 7408) to GND lineii. Connect pin 14(7486, 7408) to +5V line.iii. Connect pin 3(7486) - 1.2K - LED - ground line. Make sure the LED is connected in

the correct direction - the longer leg of the LED is anode (A)iv. Connect pin 3(7408) - 1.2K - LED - ground line.v. Connect 4 jumper wires to respective inputs of AND and XOR gates as shown and let

the other ends of the wires free (these free ends will act as switches).5. Use a paper to label the locations of the switches, relatively.6. Verify your connections again.

Now you are ready for the experiment. Turn on the power supply.

Observation

By closing and opening the switches (the free ends of jumper wires) as the switching combinations given in Table 1.1, observe the output LEDs. Verify whether they follow the truth tables or not by filling in Table A.1 in the result sheet.

This is the end of part A of the experiment.

Note: 1. Switch off the power supply.2. The circuit in Fig. 1.2 will be used in the next experiment with some modifications.

Page 3 of 13

Page 4: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

Experiment 1B: Application of Logic Gates - Binary Adder

One simple application of logic gates is a binary adder. Its function is to add two binary numbers. In this experiment, we shall design a 2-bit binary adder in the following stages:

1. Design a half adder (Fig. 1.3a) 2. Design a 1-bit full adder (Fig. 1.3b) 3. Design 2-bit adder by combining the half adder and the 1-bit full adder (Fig. 1.3c)

Fig. 1.3 Block diagrams of adders

1B.1 Design of Half Adder (30 minutes)

A half adder adds two 1-bit binary numbers. It has no carry input. The truth table of a half adder is given in Table 1.3.

Table 1.3 Truth table of half adder

Inputs Outputs

X0 Y0

Carry SumC0 S0

0 00 11 01 1

0 00 10 11 0

Boolean equations of Sum and Carry outputs are:

S0 = X0•Y0 + X0•Y0

= X0 Y0 (after simplification)

C0 = X0•Y0

Page 4 of 13

Page 5: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

Function S0 can be easily implemented using an XOR logic gate and the function C0 can be implemented using a 2-input AND gate. The logic circuit for the half adder is shown in Fig. 1.4.

Fig. 1.4 Half adder logic circuit

Experimental Procedures The actual circuit for this experiment is shown in Figure 1.5. It is a continuation of the previous experiment. Proceed with the following steps.

1. Connect 7408 inputs to 7486 inputs as shown in figure. 2. Verify your connections again. 3. Now you are ready for the experiment. Turn on the power supply.

Your next job is to verify the half adder truth table. Record your observation results. [1 mark]

Figure 1.5 1-bit half adder

This is the end of part 1 of the experiment 1B.

Note: 1. Switch off the power supply.2. Leave the circuit in Figure 1.5 in place for the next experiment (refer to Page 9).

Page 5 of 13

X0

Y0

S0

C0

S1 S2

1

2

1

2

7486

7408

3S0

1.2K

1.2K

A K

3C0

X0

Y0

Page 6: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

1B.2 Design of 2-bit Binary Adder (1 hour)

The first step of this part of the experiment is to construct a 1-bit full adder. A 1-bit full adder has 3 inputs, X, Y and a carry input. Truth table of the 1-bit full adder is as shown in Table 1.4.

The 2-bit binary adder is constructed by connecting the carry output of the half adder (C0) to the carry input of this 1-bit full adder.

Table 1.4 Truth table of a 1-bit full adder

Inputs OutputsX1 Y1 C0 Carry out Sum

C1 S1

0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

0 00 10 11 00 11 01 01 1

Boolean equations of the full adder output functions are as follows:

S1 = X1•Y1•C0 + X1•Y1•C0 + X1•Y1•C0 + X1•Y1•C0

= X1 Y1 C0 (after simplification)

C1 = X1•Y1•C0 + X1•Y1•C0 + X1•Y1•C0 + X1•Y1•C0

= X1•Y1 + X1•C0 + Y1•C0 (after simplification)

Experimental Procedures

The circuit for the 1-bit full adder is shown in Fig. 1.6. Proceed with the following steps: Note: This part involves many connections. Care must be taken. Use as few jumper wires

as possible.

1. Make sure that the power supply is turned off. Insert IC 7432 on the breadboard.2. Please make sure that the IC and other components are placed firmly on the breadboard,

otherwise, get a new breadboard from the lab. 3. Construct the circuit as shown in Fig. 1.6.

Guidelines for connections (connect from right to left, top to bottom in Fig. 1.6):i. Remove 1.2K - LED from pin 3(7408) in Fig. 1.5.

Page 6 of 13

Page 7: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

ii. Connect pin 7(7432) to GND line and pin 14(7432) to +5V line.iii. Connect pin 8(7486) - 1.2K - LED - ground line.iv. Connect pin 6(7432) - 1.2K - LED - ground line.v. Connect pin 3(7432) - pin 4(7432) line.vi. Connect pin 6(7486) - pin 9(7486) line.vii. Connect pin 6(7408) - pin 1(7432) line.viii. Connect pin 8(7408) - pin 2(7432) line.ix. Connect pin 11(7408) - pin 5(7432) line.x. Connect pin 4(7486), pin 4(7408) and pin 13(7408) together by 2 jumper wires, then

connect one end of a new jumper wire to one of the above pins and leave the other end of this jumper wire free. This is the input of X1.

xi. Connect pin 5(7486), pin 5(7408) and pin 9(7408) together by 2 jumper wires, then connect one end of a new jumper wire to one of the above pins and leave the other end of this jumper wire free. This is the input of Y1.

xii. Connect pin 10(7486), pin 10(7408) and pin 12(7408) together by 2 jumper wires, then connect one end of a new jumper wire to one of the above pins and the other end of this jumper wire to pin 3(7408). This is the input of Cin, connected to C0 of the half adder.

3. Use a paper to label the locations of the switches and the LEDs, relatively.4. Verify your connections again.

Fig. 1.6 1-bit full adder.

Note: Your complete experiment setup is now a 2-bit adder. In this part of the experiment, you are to obtain the truth table of the 2-bit binary adder.

1. Turn on the power supply. 2. Record and evaluate your observation results in Table R1 in the result sheet.

[3 marks]

At the end of your experiment,

1. Switch off the DC power supply. 2. Remove all the connections 3. Return all the components used. 4. Submit the result sheet and the mark sheet to your lab supervisors.

Page 7 of 13

Cin

S3 S4

1S

1X

1Y

1C

1.2K65

411

13

12

810

9

7408

810

9

32

1

7432

65

4 7486

65

4

1.2K

From pin 3(7408)in Fig 1.5

Page 8: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

Summary In this experiment, you have implemented logic gates functions using ICs, and analyzed and evaluated binary adder functions.

Page 8 of 13

Page 9: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

7408 AND gate

7486 XOR gate

7432 OR gate

Pin layouts 

Component testingTesting logic gates: Use Fig 1.2 and Table 1.1Testing LED: Use multimeter in diode test mode.

Removal of inserted IC from breadboardUse the tip of a pen to remove the IC as shown in the figure below. Make sure that the IC legs are not bent during the removal.

Repeat

 

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

APPENDIX

THE RESISTOR COLOR CODE CHART

COLOR SIGNIFICANT DIGIT

MULTIPLIER TOLERANCE

Black 0 1 -Brown 1 10 1%

Red 2 100 2%Orange 3 1,000 3%Yellow 4 10,000 4%Green 5 100,000 -Blue 6 1,000,000 -

Violet 7 10,000,000 -Gray 8 100,000,000 -White 9 - -Gold - 0.1 5%Silver - 0.01 10%

No Color - - 20%

Page 9 of 13

Page 10: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

Page 10 of 13

Page 11: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets___________________________________________________________________________

Additional Guideline for Experiment 1B.2 Design of 2-bit Binary Adder.

Page 11 of 13

Page 12: EEN1036: DIGITAL LOGIC DESIGN - Multimedia …foe.mmu.edu.my/lab/lab sheet/TRIM3/BETA/EEE1036-DL1,DL2... · Web viewEEE1036: DIGITAL LOGIC DESIGN Experiment 1: Logic Gates and Their

EEE1036: Digital Logic Design, Lab Exp. DL1, result and mark sheets

Student ID ……………………… Name ………………………………….. Major ………………………….___________________________________________________________________________

Experiment 1AVerify whether the LED follows the truth tables below.

Table A.1AND gate XOR gate

A B Y Output LED (on/off) A B Y Output LED (on/off)0 0 0 0 0 00 1 0 0 1 11 0 0 1 0 11 1 1 1 1 0

Experiment 1BTable R1 Truth table for the 2-bit full adder experiment (1B.2). The input (X1 X0) is to be added to input (Y1 Y0). The output will be (C1 S1 S0). Analyze the input and output manually and evaluate whether your circuit follow your analysis.

Input switches Output LEDC1

Output LEDS1

Output LEDS0

S4Y1

S3X1

S2Y0

S1X0

OFF ON OFF ON OFF ON

CLS(0) CLS(0) CLS(0) CLS(0)CLS(0) CLS(0) CLS(0) OPEN(1)CLS(0) CLS(0) OPEN(1) CLS(0)CLS(0) CLS(0) OPEN(1) OPEN(1)CLS(0) OPEN(1) CLS(0) CLS(0)CLS(0) OPEN(1) CLS(0) OPEN(1)CLS(0) OPEN(1) OPEN(1) CLS(0)CLS(0) OPEN(1) OPEN(1) OPEN(1)

OPEN(1) CLS(0) CLS(0) CLS(0)OPEN(1) CLS(0) CLS(0) OPEN(1)OPEN(1) CLS(0) OPEN(1) CLS(0)OPEN(1) CLS(0) OPEN(1) OPEN(1)OPEN(1) OPEN(1) CLS(0) CLS(0)OPEN(1) OPEN(1) CLS(0) OPEN(1)OPEN(1) OPEN(1) OPEN(1) CLS(0)OPEN(1) OPEN(1) OPEN(1) OPEN(1)

Answer the following questions: What are the results of the following binary additions? Verify them with your experimental results.

1 0 (X1 X0) 1 0 0 1 0 1 (Y1 Y0) 1 1 0 1

(C1 S1 S0)

1 1 0 1 1 1 0 1 1 1 1 1

1