Você está na página 1de 26
UNIVERSITI MALAYSIA PAHANG FACULTY OF MANUFACTURING ENGINEERING BHM 2313 DIGITAL ELECTRONICS LAB REPORT LAB 01

UNIVERSITI MALAYSIA PAHANG

FACULTY OF MANUFACTURING ENGINEERING

BHM 2313 DIGITAL ELECTRONICS

LAB REPORT LAB 01 : BINARY NUMBERS AND LOGIC GATES

NAME

STUDENT ID

March 30, 2013

: LIM KOK WEE

: HA11026

ABSTRACT

This lab session covers fundamental of digital electronics, which consists of the numbering systems and logic gates. It provides the chance for the student to implement theoretical knowledge learnt and the practical experience for the students to further understand the functionality of the logic gates and some commercialized integrated circuits (IC). It is also important for the students to familiarize with the industry standards used as it will be useful for the digital circuit design in their career path later. As this is the first lab session, it provides also the opportunity for the students to learn and familiarize the Standard Operating Procedure (SOP) of certain lab equipment, such as oscilloscope. As a plus point of this lab session, the students were given the chance to learn to simulate the digital circuit using its specific software, Multisim prior to constructing the circuit on the prototype board.

For the first part of this lab session, it covers digital number system, which is the most basic element in digital electronics. The experiments in this lab session focus on the binary number system and displaying it using a seven segment display. For the second part of this lab session, it involves determining the output states of logic gates using oscilloscope. With the output states determined from the oscilloscope, the truth table for the respective logic gates can be constructed. The logic gates used in this lab session are commercialized transistor-transistor logic (TTL) integrated circuits (IC), in which each contains two or more logic gates. In addition, Boolean Algebra and DeMorgan’s Theorem are also being implemented in this lab session as it is required to construct the basic gates (AND, OR and NOT gates) using the universal gates, which are NOR and NAND gates.

1.0 - INTRODUCTION

Digital electronics are applied in many fields, especially in the field of computer technology. The ability of the digital circuit to count digits and perform logic functions have made digital an important branch in electronics. Hence, it is vital for digital circuit designers to understand the fundamental of digital electronics, which are the number systems and basic logic gates. Generally, this lab session is aimed to expose students on the number systems and basic logic gates. This lab session is conducted to allow students to have ‘hands-onexperience on building digital circuits and to implement theoretical knowledge learnt in class into this lab session. Besides that, this first lab session also provides the opportunity for the students to learn the Standard Operating Procedure (SOP) of certain lab equipment, such as oscilloscope. In addition, this lab session also provides the opportunity for the students to learn to simulate digital circuits prior to construction of circuits on prototype board. This gives a great advantage to the digital circuit designers as problems can be rectified earlier without the need of implementing the digital circuit onto a prototype board.

Number system is the most basic element in digital electronics. There are total four number systems used in digital electronics, which are decimal, hexadecimal, binary and octal number systems. In fact, binary and hexadecimal are the most common used number system in digital electronics, especially in the field of computer technology. The number systems are interconnected and they can be converted using the specific algorithm. For the ease of code conversion from binary to decimal, binary coded decimal (BCD) is often used as an interface to binary number systems. It is used widely in converting binary numbers into decimal numbers especially displaying decimal numbers in a seven-segment display. The first part of this lab session consists of experiments generating binary numbers and displaying it as a decimal number on a seven-segment display.

Logic gates are used in performing logic functions in a digital circuit. The most basic logic gates are AND, OR and NOT gates. A digital circuit designer is ought to understand the logic function of these basic gates so that the logic function of derived gates, such as NAND and NOR gates can be understood easily. In the practical world, integrated circuits (IC) are commonly used rather than a single logic gate. Complementary Metal Oxide Semiconductor (CMOS) and Transistor-Transistor Logic (TTL) integrated circuits are being used in all applications. Hence, the second part of this lab session consists of the experiments determining the logic functions of some TTL ICs such as 7408 AND gates using oscilloscope and thus creating its truth table. In addition, the experiments also involve the use of universal gates, NAND and NOR gates to create the basic logic gates (AND, OR and NOT gates). This requires the use of Boolean Algebra and DeMorgan’s Theorem as well in this lab session.

2.0 OBJECTIVES

The objectives of this lab session are as follows:

1. To provide practical experience for the students to implement knowledge learnt in class in the following topics :

a. Number systems, especially binary number system and binary coded decimal for easy conversion between binary number and decimal number

b. Logic gates in the form of commercialized integrated circuits (IC)

c. Constructing truth tables for logic gates

d. Boolean Algebra and DeMorgan’s Theorem

e. Circuit troubleshooting

2. To provide a chance for students to familiarize with the industry standards used for all digital components.

a. To obtain information from the datasheet given by the manufacturers.

3. To provide opportunity for the students to familiarize with the lab equipment

a. To learn Standard Operating Procedure (SOP) of the lab equipment

b. To learn to operate lab equipment for measurement purpose

4. To expose students to simulation of digital circuits using simulation software, National Instruments (NI) Multisim.

a. To learn to simulate digital circuits prior to constructing on prototype board

3.0 PROCEDURES FOR EXPERIMENTS

Circuit simulation is done prior to constructing the circuits on the prototype board for every experiment carried out in this lab session. This is to increase the productivity of the lab session as the expected outputs have been simulated.

Experiment 1.3.1 Binary Generation Binary number can be generated by using the switch to toggle between on and off state of LED, which acts as the output to display the binary number generated.

List of components and instrument

1. Resistor 1kΩ – 4 pieces

2. LED 4 pieces

3. Dual in-line package (DIP) switch 4 pieces

4. DC Power Supply with its connecting wire 1 unit

5. Digital Multimeter 1 unit

6. Wire

Procedures

1. Four bits binary number generation circuit is constructed and simulated in Multisim

according to part of circuit given in the lab sheet as shown in Figure 1.

part of circuit given in the lab sheet as shown in Figure 1. Figure 1 shows

Figure 1 shows the part of the circuit given in lab sheet.

Figure 1 shows the part of the circuit given in lab sheet. 2 Multisim. Figure shows

2

Multisim.

Figure

shows

the

simulated

circuit

in

2. All 16 possible combinations of switch positions (0000, 0001, …,1111) are simulated and the states of output LEDs are recorded.

3. The circuit is then constructed on a prototype board according to Figure 1 and 2. The circuit in Figure 1 is constructed repeatedly for four times to form circuit in Figure 2. All four circuits share the same DC voltage source of 5V.

a. The default connection of the dual in-line package (DIP) switch is set to be open and the open configuration of the DIP switch is determined by checking the continuity between pins of DIP switch using digital multimeter. One end of DIP switch is connected to the 1kΩ resistor while the other end of DIP switch is connected to ground.

b. Anode of LED is connected to the resistor while the cathode of LED is connected

to ground.

4. All 16 possible combinations of switch positions (0000, 0001, …, 1111) are tested and the state of switches and LEDs are recorded.

Figure 3 shows the constructed circuit list for experiment 1.3.1 5. The outputs acquired from

Figure 3 shows the constructed circuit list for experiment 1.3.1

5. The outputs acquired from the experiment are then analysed.

Experiment 1.3.2 Binary Translation This is an extension of previous experiment. After generation of 4 bits binary number from the previous circuit, binary numbers can be decoded using a 7447 IC, which is a binary coded decimal (BCD) to common anode 7-segment decoder, and then displayed as a decimal digit on a 7-segment display. Due to the use of 7447 IC, the 7-segment display must be a common anode component as well to make sure the binary numbers are decoded correctly.

List of components

1. Resistor 1kΩ – 4 pieces

2. LED 4 pieces

3. Dual in-line package (DIP) switch 4 pieces

4. 7447 IC (Common Anode) 1 unit

5. 7-segment display (Common Anode) 1 unit

6. DC Power Supply with its connecting wire 1 unit

7. Wire

Procedures

1. Datasheet of 7-segment display is checked to make sure it is a common anode component.

2. Extend previously constructed circuit in Multisim by adding a 7447 IC and a common anode 7-segment display. The inputs for the 7447 are the four bits binary generator from

previous experiment. These inputs are connected in parallel with the LEDs

These inputs are connected in parallel with the LEDs Figure 4 shows the constructed circuit in

Figure 4 shows the constructed circuit in Multisim

3. The circuit is simulated using Multisim. The states of LEDs and the outputs of 7-segment display of all 16 combinations of switch positions (0000, 0001, …, 1111) are recorded.

4. Circuit for previous experiment on the prototype board is extended with 7447 IC and a common anode 7-segment display.

a. The 4 inputs of binary number to the 7447 IC are connected parallel to the LEDs.

b. The output pins (A-G) of the 7447 IC are connected to the input pins (a-g) on the common anode 7-segment display.

c. To prevent from any floating inputs in a TTL IC, all unconnected pins (Pin 3 Lamp Test, Pin 4 Blanking Input/Ripple Blanking Output and Pin 5 Ripple Blanking Input) are connected to the Vcc, which is the DC voltage source of 5V.

d. The common anode 7-segment display is then connected to Vcc.

5. All 16 possible combinations of switch positions (0000, 0001, …, 1111) are tested. The output of LEDs and 7-segment display is recorded for each combination.

6. The outputs acquired from the experiment are then analysed.

The outputs acquired from the experiment are then analysed. Figure 5 shows the constructed circuit for

Figure 5 shows the constructed circuit for experiment 1.3.2

Experiment 1.4 TTL Logic Gates There are in total 8 types of TTL Logic Gates Integrated Circuit given in the lab sheet. They are 7408 Quad 2-input AND gate, 7432 Quad 2-Input OR gate, 7404 Hex Inverter, 7421 Dual 4-Input AND gate, 7425 Dual 4-Input NOR gate, 7400 Quad 2-Input NAND gate, 7402 Quad 2-Input NOR gate and 7486 Quad 2-Input XOR gate. However, the lab does not have stock for 7425 Dual 4-Input NOR. 7425 Dual 4-Input NOR gate is replaced by equivalent gate constructed from 7432 Quad 2-Input OR gate and 7404 Hex Inverter. To manipulate the inputs for these gates, circuits in Figure 1 is used in this experiment. The input and output of these gates will be represented by the state of LEDs. In addition, the pin assignments for standard TTL logic gates integrated circuits are given in the lab sheet.

List of components and instruments

1. Resistor 1kΩ – 5 pieces

2. LED 5 pieces

3. Dual in-line package (DIP) switch 4 pieces

4. 7408 Quad 2-input AND gate 1 piece

5. 7432 Quad 2-Input OR gate 1 piece

6. 7404 Hex Inverter 1 piece

7. 7400 Quad 2-Input NAND gate 1 piece

8. 7402 Quad 2-Input NOR gate 1 piece

9. DC Power Supply with its connecting wire 1 unit

10. Oscilloscope 1 unit

11. Wire

Procedures

1. Circuit for a 7408 Quad 2-input AND gate is constructed using Multisim. The 2 bits inputs are constructed using the circuit in Figure 1. The output is represented by a LED

connected in series with a 1kResistor. The output is then measured with an oscilloscope.

2.

The circuit is simulated using Multisim. The output of LED state and oscilloscope is recorded according the input combinations.

3. Repeat steps 1 and 2 by replacing with 7408 Quad 2-input AND gate with 7432 Quad 2- Input OR gate, 7404 Hex Inverter, 7421 Dual 4-Input AND gate, 7400 Quad 2-Input NAND gate, 7402 Quad 2-Input NOR gate, 7486 Quad 2-Input XOR gate, 7425 Dual 4- Input NOR gate and its equivalent gate constructed using 7432 OR and 7404 NOT gate. The number of inputs for respective TTL Logic gate IC can be increased or decreased by adding or removing the circuit as shown in Figure 1.

by adding or removing the circuit as shown in Figure 1. Figure 6 shows the constructed

Figure 6 shows the constructed circuit for equivalent 7425 Dual 4-input NOR gate in Multisim.

for equivalent 7425 Dual 4-input NOR gate in Multisim. Figure 7 shows the constructed circuit for

Figure 7 shows the constructed circuit for 7425 4-input NOR gate in Multisim.

constructed circuit for 7425 4-input NOR gate in Multisim. for equivalent 7425 Dual 4-input NOR gate

for

equivalent 7425 Dual 4-input NOR gate on prototype board.

Figure

8

shows

the

constructed

circuit

4. Circuit for a 7408 Quad 2-input AND gate is constructed on the prototype board. Inputs are constructed based on the circuit in Figure 1. The output of AND gate is wired to a 1kResistor and a LED.

a. Oscilloscope is set up and the positive of X10 probe is connected to the output of the logic gate whereas the negative of the probe is connected to the ground.

b. The outputs of LED state and oscilloscope are recorded according to the different

input combinations.

5. Steps 4 to 6 are repeated by replacing 7408 Quad 2-input AND gate with 7432 Quad 2- Input OR gate, 7404 Hex Inverter, 7400 Quad 2-Input NAND gate, 7421 Dual 4-Input AND gate, 7486 Quad 2-Input XOR gate, 7402 Quad 2-Input NOR gate and 7425 equivalent gate. The number of inputs for respective TTL Logic gate IC can be increased and decreased by adding or removing the circuit as shown in Figure 1.

6. The outputs acquired from the experiment are then analysed.

Experiment 1.5 Truth Table Truth table for logic gates can be constructed by using the previous circuits used in experiment 1.4. Truth table for 7408 AND, 7432 OR and 7400 NAND gate is constructed by

acquiring the output of the logic gate through the state of LED based on different combinations of input.

List of components and instruments

1. Resistor 1kΩ – 3 pieces

2. LED 3 pieces

3. Dual in-line package (DIP) switch 2 pieces

4. 7408 Quad 2-input AND gate 1 piece

5. 7432 Quad 2-Input OR gate 1 piece

6. 7400 Quad 2-Input NAND gate 1 piece

7. DC Power Supply with its connecting wire 1 unit

8. Wire

Procedures

1. Circuits for 7408 AND gates from previous experiment is constructed without presence of oscilloscope in Multisim.

2. Circuit is simulated and the state of output LED is recorded for every input combinations. Repeat steps 1 and 2 by replacing 7408 AND gates with 7432 OR and 7400 NAND gates.

replacing 7408 AND gates with 7432 OR and 7400 NAND gates. Figure 9 shows the constructed

Figure 9 shows the constructed circuit for 7408 Quad 2-input AND gate in Multisim.

circuit for 7408 Quad 2-input AND gate in Multisim. Figure 10 shows the constructed circuit for

Figure 10 shows the constructed circuit for 7408 Quad 2-input AND gate on prototype board.

3. Circuit in experiment 1.4 for 7408 AND gate is constructed without presence of oscilloscope in prototype board.

4. The output states of LED are recorded according to the input combinations of switch positions.

5. Truth table is constructed using the data acquired from the experiment.

6. Repeat steps 4 to 6 by replacing 7408 AND gates with 7432 OR and 7400 NAND gates.

Experiment 1.5.1 Two inputs of a NAND gate will have same input. Hence, function of NAND gate will be altered. A truth table for this function can be created through the states of output LED.

List of components and instruments

1. Resistor 1kΩ – 2 pieces

2. LED 2 pieces

3. Dual in-line package (DIP) switch 1 piece

4. 7400 Quad 2-Input NAND gate 1 piece

5. DC Power Supply with its connecting wire 1 unit

6. Wire

Procedures

1. Circuit for 7400 NAND gates with a single switch for input is constructed in Multisim. The input from the switch will act as the input for A and B in NAND gate.

2. The circuit is simulated and the states of output LED are recorded according to the input.

states of output LED are recorded according to the input. Figure 11 shows the constructed circuit

Figure 11 shows the constructed circuit for experiment 1.5.1 in Multisim.

the constructed circuit for experiment 1.5.1 in Multisim. Figure 12 shows the constructed circuit for experiment

Figure 12 shows the constructed circuit for experiment 1.5.1 on prototype board.

3. Circuit from the previous experiment using 7400 NAND gates to construct truth table is modified. The second input of the previous circuit is removed.

a. The two inputs of 7400 NAND gates are joined and the input from the switch will act as the input for both the inputs.

4. The state of output LED is observed and recorded.

5. Truth table s constructed based on the data acquired and thus the function of NAND gate under this configuration is analysed.

Experiment 1.5.2 This experiment is an extension of the experiment 1.5.1. The 1kΩ resistor at the input is replaced by a 1kΩ variable resistor so that the input voltage can be varied. Hence, the operating region of low and high voltage can be determined from this experiment.

List of components and instruments

1. Resistor 1kΩ – 1 piece

2. Variable resistor 1kΩ – 1 piece

3. LED 1 piece

4. 7400 Quad 2-Input NAND gate 1 piece

5. DC Power Supply with its connecting wire 1 unit

6. Digital Multimeter 1 unit

7. Wire

Procedures

1. The circuit is modified from the previous experiment in Multisim. 1kresistor in the input is replaced with variable resistor of 1k. DIP switch and LED at the input are removed from the circuit. Multimeter is used to measure the input voltage for the 7400 NAND logic gate.

2. The circuit is simulated. The input voltage is varied using the variable resistor and measured by using multimeter. The state of the output LED is being observed and recorded as a function of input voltage.

3. The circuit is constructed on prototype board by modifying the previous circuit used in experiment 1.5.1. LED and DIP switch are removed.

The end of variable resistor is connected to Vcc = 5V and ground, leaving the voltage at the center tap to be varied.

4. The resistance of the variable resistor is measured using the digital multimeter.

5. The input voltage into 7400 NAND logic gate is measured using multimeter while the state of output LED is being observed and recorded.

6. Repeat steps 4 and 5 with the minimum, maximum resistance and the resistance that changes the state of output LED.

a.

and the resistance that changes the state of output LED. a. Figure 13 shows the constructed

Figure 13 shows the constructed circuit for experiment 1.5.2 in Multisim.

the constructed circuit for experiment 1.5.2 in Multisim. Figure 14 shows the constructed circuit for experiment

Figure 14 shows the constructed circuit for experiment 1.5.2 on a prototype board

Experiment 1.6 Universal NORs and NANDs NOR and NAND are universal gates, whereby any types of gates can be constructed using them. OR gate could be constructed using only NAND gates and the truth table constructed from the alternative circuit consists of NAND gates is similar to truth table of OR gate.

List of components and instruments

1. Resistor 1kΩ – 3 pieces

2. LED 3 pieces

3. Dual in-line package (DIP) switch 2 pieces

4. 7400 Quad 2-Input NAND gate 1 piece

5. DC Power Supply with its connecting wire 1 unit

6. Wire

Procedures

1. The logic expression of the NAND gates equivalent to OR gate is derived using

DeMorgan’s Theorem. ̅̅̅̅̅

A + B

̅ .

=

=

=

̅

̿

̿ +

A + B

2. The circuit is similar to experiment 1.4. The circuit is constructed in Multisim by placing 2 inputs, which act as the input for 7400 NAND gates. The output is determined by a LED wired in series with a 1kΩ resistor.

3. The circuit is simulated. The state of output LED is observed and recorded.

4. The circuit is constructed on a prototype board with reference to the simulated circuit shown in Figure 6.

5. The state of output LED is observed and recorded according to the input combinations.

6. Truth table is constructed from the data acquired from the experiment.

Figure 15 shows the constructed circuit for experiment 1.6 in Multisim Figure 16 shows the

Figure 15 shows the constructed circuit for experiment 1.6 in Multisim

shows the constructed circuit for experiment 1.6 in Multisim Figure 16 shows the constructed circuit for

Figure 16 shows the constructed circuit for experiment 1.6 on prototype board

Experiment 1.6.1 Constructing AND gate using NOR gate AND gate could be constructed using only NOR gates and the truth table constructed from the alternative circuit consists of NOR gates is similar to truth table of AND gate.

List of components and instruments

1. Resistor 1kΩ – 3 pieces

2. LED 3 pieces

3. Dual in-line package (DIP) switch 2 pieces

4. 7402 Quad 2-Input NOR gate 1 piece

5. DC Power Supply with its connecting wire 1 unit

6. Wire

Procedures

1. The logic expression of the NOR gates equivalent to AND gate is derived using

DeMorgan’s Theorem. ̅̅̅̅̅̅̅̅

A . B

̅ +

̅

=

̿

̿ .

= A . B

=

2. The circuit is similar to the circuit constructed in Multisim for experiment 1.6. The 7400 NAND gate is replaced by a 7402 NOR gate.

3. The circuit is simulated. The state of output LED is observed and recorded.

simulated. The state of output LED is observed and recorded. Figure 17 shows the constructed circuit

Figure 17 shows the constructed circuit for experiment 1.6.1 in Multisim

the constructed circuit for experiment 1.6.1 in Multisim Figure 18 shows the constructed circuit for experiment

Figure 18 shows the constructed circuit for experiment 1.6.1 in Multisim

4. The circuit is constructed on a prototype board with reference to the simulated circuit shown in Figure 7.

5. The state of output LED is observed and recorded according to the input combinations.

6. Truth table is constructed from the data acquired from the experiment.

Experiment 1.6.2 Constructing XOR gate using NAND gate XOR gate could be constructed using only NOR gates and the truth table constructed from the alternative circuit consists of NAND gates only is similar to truth table of XOR gate.

List of components and instruments

1. Resistor 1kΩ – 3 pieces

2. LED 3 pieces

3. Dual in-line package (DIP) switch 2 pieces

4. 7400 Quad 2-Input NAND gate 1 piece

5. DC Power Supply with its connecting wire 1 unit

6. Wire

Procedures

1. The truth table for a 7486 XOR gate is written down.

2. Construct a circuit with the given expression, Q =(A. )

̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ ̅̅̅̅ ̅̅̅̅̅̅̅̅̅̅

̅̅̅̅̅̅̅̅̅̅ . (B.

̅̅̅̅ )

, with only 7400

NAND gates in Multisim. The input circuit is same as the circuit in Figure 1.

3. The circuit is simulated. The state of output LED is observed and recorded.

simulated. The state of output LED is observed and recorded. Figure 19 shows the constructed circuit

Figure 19 shows the constructed circuit for experiment 1.6.2 in Multisim.

the constructed circuit for experiment 1.6.2 in Multisim. Figure 20 shows the constructed circuit for experiment

Figure 20 shows the constructed circuit for experiment 1.6.2 on prototype board.

4.

The circuit is constructed on a prototype board with reference to the simulated circuit shown in Figure 13.

7.

The state of output LED is observed and recorded according to the input combinations.

8.

Truth table is constructed from the data acquired from the experiment.

4.0 RESULTS AND ANALYSIS

Experiment 1.3.1 Binary Generation Binary number consists only, 0 and 1. Hence, it can be represented by the states of LED, off and on respectively. The circuit in Figure 1 can generate binary number with the switch triggering the state of the output LED and each circuit is considered 1 bit. Four equivalent circuits in Figure 1, which is a 4 bit binary generation circuit, can be used to represent 16 digits numbered from 0 to 15. This can be done as the circuit has 2 4 = 16 combinations of input (0000, 0001, …, 1111) according to this equation, number of combination = 2 n , where n is the number of bits. The circuit in Figure 1 is an active-low circuit as the LED is on when no input is given. When the switch is pressed, the LED is turned off.

Table 1 shows decimal number, its binary number and the switches and LEDs state observed.

Decimal

Binary

Switch; LED 1 State (MSB)

Switch; LED

Switch; LED

Switch; LED 4 State (LSB)

number

number

2 State

3 State

0

0000

On ; Off

On ; Off

On ; Off

On ; Off

1

0001

On ; Off

On ; Off

On ; Off

Off ; On

2

0010

On ; Off

On ; Off

Off ; On

On ; Off

3

0011

On ; Off

On ; Off

Off ; On

Off ; On

4

0100

On ; Off

Off ; On

On ; Off

On ; Off

5

0101

On ; Off

Off ; On

On ; Off

Off ; On

6

0110

On ; Off

Off ; On

Off ; On

On ; Off

7

0111

On ; Off

Off ; On

Off ; On

Off ; On

8

1000

Off ; On

On ; Off

On ; Off

On ; Off

9

1001

Off ; On

On ; Off

On ; Off

Off ; On

10

1010

Off ; On

On ; Off

Off ; On

On ; Off

11

1011

Off ; On

On ; Off

Off ; On

Off ; On

12

1100

Off ; On

Off ; On

On ; Off

On ; Off

13

1101

Off ; On

Off ; On

On ; Off

Off ; On

14

1110

Off ; On

Off ; On

Off ; On

On ; Off

15

1111

Off ; On

Off ; On

Off ; On

Off ; On

Table 2 shows comparison of some observed output and simulated output.

Note : Switch on, LED off = 0 ; Switch off, LED on = 1;

Binary number : 0000 (0) Binary number : 1101 (13) Binary number : 1111 (15)
Binary number : 0000 (0) Binary number : 1101 (13) Binary number : 1111 (15)
Binary number : 0000 (0) Binary number : 1101 (13) Binary number : 1111 (15)

Binary number : 0000 (0)

Binary number : 1101 (13)

Binary number : 1111 (15)

Binary number : 1101 (13) Binary number : 1111 (15) Binary number : 0000 (0) Binary
Binary number : 1101 (13) Binary number : 1111 (15) Binary number : 0000 (0) Binary
Binary number : 1101 (13) Binary number : 1111 (15) Binary number : 0000 (0) Binary

Binary number : 0000 (0)

Binary number : 1101 (13)

Binary number : 1111(15)

Experiment 1.3.1 Binary Translation Binary numbers can de decoded into decimal digits by a binary-coded decimal (BCD) to common anode 7-segment display decoder (7447 IC). The segments in 7-segment display will light up according to the seven outputs of 7447 IC and thus displaying the decimal digit.

Table 3 shows the truth table with the expected and observed output of decimal digit.

Note : Switch on, LED off = 0 ; Switch off, LED on = 1;

Binary

 

Binary display segment

 

Expected

Observed

Simulated and circuit output

number

a

b

c

d

e

f

g

decimal

decimal

0000

on

on

on

on

on

on

off

0

0

0000 on on on on on on off 0 0

0001

off

on

on

off

off

off

off

1

1

0001 off on on off off off off 1 1

0010

on

on

off

on

on

off

on

2

2

0010 on on off on on off on 2 2
1 0010 on on off on on off on 2 2 0011 on on on on

0011

on

on

on

on

off

off

on

3

3

0011 on on on on off off on 3 3

0100

off

on

on

off

off

on

on

4

4

0100 off on on off off on on 4 4

0101

on

off

on

on

off

on

on

 

5 5

0101 on off on on off on on   5 5

0110

off

off

on

on

on

on

on

 

6 6

0110 off off on on on on on   6 6

0111

on

on

on

off

off

off

off

 

7 7

0111 on on on off off off off   7 7

1000

on

on

on

on

on

on

on

 

8 8

1000 on on on on on on on   8 8

1001

on

on

on

off

off

on

on

 

9 9

1001 on on on off off on on   9 9
8 8 1001 on on on off off on on   9 9 1010 off off

1010

off

off

off

on

on

off

on

1010 off off off on on off on
1010 off off off on on off on
1010 off off off on on off on

1011

off

off

on

on

off

off

on

1011 off off on on off off on
1011 off off on on off off on
1011 off off on on off off on
1011 off off on on off off on 1100 off on off off off on on

1100

off

on

off

off

off

on

on

1100 off on off off off on on
1100 off on off off off on on
1100 off on off off off on on
off on 1100 off on off off off on on 1101 on off off on off

1101

on

off

off

on

off

on

on

1101 on off off on off on on
1101 on off off on off on on
1101 on off off on off on on

1110

off

off

off

on

on

on

on

1110 off off off on on on on
1110 off off off on on on on
1110 off off off on on on on
on on 1110 off off off on on on on 1111 off off off off off

1111

off

off

off

off

off

off

off

No

No display.

1111 off off off off off off off No No display.
1111 off off off off off off off No No display.

display.

According to the result shown in the table above, only decimal digit ranging from ‘0’ to ‘9’ has been displayed for the binary inputs smaller than 1010. The 7-segment display shows strange output and does not display hexadecimal digits, A to F, for binary inputs larger than 1001.This is due to the use of binary coded decimal (BCD) to common anode display decoder (7447 IC). Binary coded decimal (BCD) means that each decimal digit, 0 through 9, is represented by a binary code of 4 bits. When four bits system is used, only ten code combinations are used, which are smaller than 1010. The remaining six code combinations (1010, 1011, 1100, 1101, 1110 and 1111) are not used and they are invalid codes in BCD code. Hence, 7-segment display shows strange outputs for binary input more than 1001.

Experiment 1.4 Logic Gates Output of logic gates can be determined using states of output LED, logic probe or oscilloscope. In this experiment, oscilloscope is used to determine the output states of logic gates. In addition, truth table can also be constructed. Due to the lack of 7425 Dual 4-input NOR logic gate, equivalent logic gate were constructed by using 7432 OR and 7404 NOT

gate using the following logic expression, Y = (A ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ + B) + (C + D) . The equivalent gate

should produce the same truth table for 7425 Dual 4-input NOR logic gate.

the same truth table for 7425 Dual 4-input NOR logic gate. Figure 21 shows that the
the same truth table for 7425 Dual 4-input NOR logic gate. Figure 21 shows that the

Figure 21 shows that the comparison of oscilloscope reading between the circuit and simulated circuit for 7425 4-input NOR equivalent gate with input 0000.

This figure has shown that equivalent gate produces same output as the simulated 7425 Dual 4-Input NOR gate. Hence, simulation data are the same as the circuit on prototype board. When all inputs are to be low (0000), output of 7425 gate will produce a high output, which turns the output LED on. As seen from Figure 21, the oscilloscope records a high voltage when all switches are pressed to produce low inputs (0000). The default reading for oscilloscope is low voltage for output of 7425 NOR gate as all inputs are high (1111).

for output of 7425 NOR gate as all inputs are high (1111). (a) (b) (c) (d)

(a)

output of 7425 NOR gate as all inputs are high (1111). (a) (b) (c) (d) Figure

(b)

of 7425 NOR gate as all inputs are high (1111). (a) (b) (c) (d) Figure 22

(c)

of 7425 NOR gate as all inputs are high (1111). (a) (b) (c) (d) Figure 22

(d)

Figure 22 shows oscilloscope reading for (a) 7421 Dual 4-Input AND gate with input 0000 Low Output, (b) 7402 Quad 2-input NOR gate with input 00 High Output , (c) 7400 Quad 2-input NAND gate with input 10 High Output and (d) 7486 Quad 2-input XOR gate with input 10High Output

Figure 22 has shown that the oscilloscope will measure the default output when no input is given and it will show the transition between the output states when there’s an input which can cause a change in output state. Due to the high amount of outputs with these eight logic gates, the oscilloscope reading for the output state are being tabulated into a truth table shown in Table 4.

Table 4 shows the truth table for all logic gates used in this experiment with its oscilloscope reading.

 

Logic gate

 

Input

 

Output

Oscilloscope reading

 

A

B

C

D

Y

7408

Quad 2-input AND gate

0

0

-

-

0

Low

 

0

1

-

-

0

Low

1

0

-

-

0

Low

1

1

-

-

1

High

7432

Quad 2-input OR gate

0

0

-

-

0

Low

 

0

1

-

-

1

High

1

0

-

-

1

High

1

1

-

-

1

High

7404

Hex Inverter

0

-

-

-

1

High

 

1

-

-

-

0

Low

7421

Dual 4-input AND gate

0

0

0

0

0

Low

 

0

0

0

1

0

Low

0

0

1

0

0

Low

0

0

1

1

0

Low

0

1

0

0

0

Low

0

1

0

1

0

Low

0

1

1

0

0

Low

0

1

1

1

0

Low

1

0

0

0

0

Low

1

0

0

1

0

Low

1

0

1

0

0

Low

1

0

1

1

0

Low

1

1

0

0

0

Low

1

1

0

1

0

Low

1

1

1

0

0

Low

1

1

1

1

1

High

7425 Dual 4-input NOR gate (Obtained from equivalent gate)

0

0

0

0

1

High

0

0

0

1

0

Low

 

0

0

1

0

0

Low

0

0

1

1

0

Low

0

1

0

0

0

Low

0

1

0

1

0

Low

0

1

1

0

0

Low

0

1

1

1

0

Low

1

0

0

0

0

Low

1

0

0

1

0

Low

1

0

1

0

0

Low

1

0

1

1

0

Low

1

1

0

0

0

Low

1

1

0

1

0

Low

1

1

1

0

0

Low

1

1

1

1

0

Low

7400

Quad 2-input NAND gate

0

0

-

- 1

High

 

0

1

-

- 1

High

1

0

-

- 1

High

1

1

-

- 0

Low

7402

Quad 2-input NOR gate

0

0

-

- 1

High

 

0

1

-

- 0

Low

1

0

-

- 0

Low

1

1

-

- 0

Low

7486

Quad 2-input XOR gate

0

0

-

- 0

Low

 

0

1

-

- 1

High

1

0

-

- 1

High

1

1

-

- 0

Low

Oscilloscope enables the easy determination of output states in a digital circuit. With the help of oscilloscope, the output of the logic gate can actually be determined without the use of output LED as logic indicator.

Experiment 1.5 Truth tables Truth tables for 7408 AND gate, 7432 OR gate and 7400 NAND gates are constructed based on the outputs obtained from the experiment.

Note : Switch on, LED off = 0; Switch off, LED on = 1; 0 = LOW;

1=HIGH;

Table 5 shows the truth table for 7408 AND gate

Input

Output

Circuit output

A

B

Y = A . B

0

0

0

0 0 0

0

1

0

0 1 0

1

0

0

1 0 0

1

1

1

1 1 1

Table 6 shows the truth table for 7432 OR gate

Input

Output

Circuit output

A

B

Y = A + B

0

0

0

0 0 0

0

1

1

0 1 1

1

0

1

1 0 1

1

1

1

1 1 1

Table 7 shows the truth table for 7400 NAND gate

Input

Output

Circuit output

A

B

Y = ̅̅̅̅̅̅ .

0

0

1

0 0 1

0

1

1

0 1 1

1

0

1

1 0 1

1

1

0

1 1 0

Experiment 1.5.1 NAND gate is one of the universal gates which is functionally complete. Many logic gates can be constructed with NAND gates. When the two inputs of NAND gates are joined, both inputs will have the same input from the input circuit, which is the switch. In this

configuration, the function of NAND gate will be altered and NAND gates acts as an inverter. The following logic expression will prove the function of NAND as inverter when both

inputs are joined. Y = . ̅̅̅̅̅ = ̅ .

Table 8 shows the truth table of NAND gate as inverter consisting of circuit output and simulated output when both inputs are joined.

Input

Output

Circuit output

Simulated output

 

̅

A

Y =

0

1

0 1
0 1

1

0

1 0
1 0

Experiment 1.5.2 This experiment is done to determine the region of LOW (0) and HIGH (1) of a 7400 NAND logic gate. The input voltage is controlled by a variable resistor of 1kΩ. From the 7400 NAND logic gate datasheet, the LOW region should lies below 1.1V and HIGH region is 2.0V and above. The undefined region/tri-state lies in between 1.1V and 2.0V. The output for input voltage which lies in the tri-state is unknown. Hence, in this experiment, only the LOW region can be determined.

Table 9 shows the output as a function of input voltage.

Output state

Input voltage

Resistance

Circuit output

of LED

On

Minimum input voltage (LOW)

3.9 mV

1068

On Minimum input voltage (LOW) 3.9 mV 1068 Ω
 

0.975

V

876

  0.975 V 876 Ω

Off

Undefined region (Start)

1.151

V

833

Off Undefined region (Start) 1.151 V 833 Ω

Minimum input voltage (HIGH)

undefined

undefined

-

Maximum input voltage (HIGH)

4.97 V

3

Maximum input voltage (HIGH) 4.97 V 3 Ω

According to the experiment, the minimum LOW voltage is 3.9mV which will trigger a HIGH output. As the input voltage increases to 1.151V, which the transition from LOW region to undefined region, the output LED is off. Due to the unknown output at undefined region, the minimum input voltage for HIGH region cannot be determined. The maximum input voltage for HIGH region is at 4.97V. Hence it can be derived that the operating voltage region for 7400 NAND gate is between 3.9 mV to 4.97 V which is similar to the data from datasheet (0 to 5V). For the LOW region, the voltage region lies from 3.9 mV to 1.151V, which is quite similar to the given data (0 to 1.1V).

Experiment 1.6 Universal NORs and NANDs Universal gates are gates which are functionally complete. Functional completeness means

that every possible logic gate can be realized as a network of gates of the types prescribed by the set. In particular, all logic gates can be assembled from either only binary NAND gate or only binary NOR gate. Hence, NAND and NOR are the universal gates. In this experiment, OR gate is constructed using NAND gates only. The derived logic expression of the NAND gates equivalent to OR gate using DeMorgan’s Theorem is shown below :

A + B

=

=

=

̅̅̅̅̅

̅

̅ .

̿

̿ +

A + B

Table 10 shows the truth table for OR gate and the OR gate constructed using NAND gate.

 

OR gate

 

OR gate constructed using NAND gate

Input

Output

Input

Output

Circuit output

A

B

Y = A+B

A

B

Y

0

0

0 0

 

0

0

0 0 0 0   0 0

0

1

1 0

 

1

1

0 1 1 0   1 1

1

0

1 1

 

0

1

1 0 1 1   0 1

1

1

1 1

 

1

1

1 1 1 1   1 1

The output for the OR gate constructed using NAND gate is similar to the original OR gate. Hence, NAND gate is a universal gate.

Experiment 1.6.1 Constructing AND gate using NOR gate This experiment is the extension of the previous topic, universal gate. NOR gate is also one of the universal gates. Hence, other logic gates can be constructed by using it only. This experiment involves constructing AND gate with only usage of NOR gate.

using

DeMorgan’s Theorem is shown below :

The

derived

logic

expression

of

the

NOR

gates

equivalent

to

AND

gate

A . B

̅̅̅̅̅̅̅̅

̅ +

̅

=

̿ .

= A . B

=

̿

Table 11 shows the truth table for AND gate and the AND gate constructed using NOR gate.

 

AND gate

 

OR gate constructed using NOR gate

Input

Output

Input

Output

Circuit output

A

B

Y = A . B

A

B

Y

0

0

0

0

0

0

0 0 0 0 0 0

0

1

0

0

1

0

0 1 0 0 1 0

1

0

0

1

0

0

1 0 0 1 0 0

1

1

1

1

1

1

1 1 1 1 1 1

The output for the AND gate constructed using NOR gate is similar to the original AND gate. Hence, NOR gate is a universal gate. As a conclusion for this experiment and the previous one, universal gates consists of only NAND and NOR gates, which are functionally complete.

Experiment 1.6.2 Constructing XOR gate using NAND gate

As the previous discussion stated, NAND gate is one of the universal gates. XOR gate can be ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ ̅̅̅̅̅̅̅̅̅̅

.

constructed by using NAND gates only with the given logic expression, Q =(A. )

̅̅̅̅̅̅̅̅̅̅ . (B.

̅̅̅̅

̅̅̅̅ )

Table 11 shows the truth table for XOR gate and the XOR gate constructed using NAND gate.

 

XOR gate

 

XOR gate constructed using NAND gate

Input

Output

Input

Output

Circuit output

A

B

Y = A . B

A

B

Y

0

0

0

0

0

0

0 0 0 0 0 0

0

1

1

0

1

1

0 1 1 0 1 1

1

0

1

1

0

1

1 0 1 1 0 1

1

1

0

1

1

0

1 1 0 1 1 0

The output for the XOR gate constructed using NOR gate is similar to the original XOR gate.

5.0 CONCLUSION

Fundamental of digital electronics covers number systems, logic gates, DeMorgan’s Theorem and Boolean Algebra. These basic elements will further expand digital electronics into a sophisticated branch of electronics. This lab session expose students on these fundamentals besides providing the opportunities to students to get familiarize with lab equipment. Most common used number system used in digital electronics is binary number system, which consists only 0 and 1. It is also vital for circuit designer to understand the concept of binary coded decimal (BCD) used for decoding binary into decimal number system. BCD has a great advantage in binary to decimal conversion especially in a digital circuit, which has a limited processing, for example, digital thermometer. However, BCD is not as efficient as binary number when it involves arithmetic operation. In addition, logic gate is the other fundamental which is covered in this lab session. There are two main category of logic gate, CMOS and TTL. In this lab session, logic gates used are commercialized TTL logic gates integrated circuits (ICs). Information on these industrialized ICs can be found in the datasheet provided by the ICs manufacturers such as Renesas, Motorola, National Instruments and others. To further understand logic gates and its function, its output has been measured using oscilloscope and truth table has been constructed. In addition, lab does not have stock for 7425 Dual 4-Input NOR gate. Boolean algebra and DeMorgan’s Theorem were implemented to obtain its equivalent gate. NAND and NOR gates as universal gates has been introduced in this lab session as well. These gates are functionally complete and other logic gates can be constructed by using them. There are experiments, which involves the construction of gates using universal gates only. Hence, Boolean algebra and DeMorgan’s Theorem is once again applied. In order to construct a correct equivalent gate, truth table of the equivalent gate is constructed and compared with the original gate. As this lab session is the first digital lab session, it also provides the opportunity for students to get familiarize with the lab equipment such as oscilloscope. The Standard Operating Procedure (SOP) of the lab equipment is introduced and the way to operate the equipment for measurement purpose is also introduced. The students also get to learn the way to operate oscilloscope and analyse the measurement done by oscilloscope during this lab session. The students should also learn from this lab session to set up the equipment to the necessary setting for certain measurement to prevent output of the equipment being imprecise, inaccurate and unreliable. Lastly, one of the vital elements of this lab session is digital circuit simulation. National Instruments (NI) Multisim is introduced as the simulation software. The students were advised by lab instructor to simulate the digital circuit prior to the construction of the circuit on prototype board. Simulation of digital circuit can greatly improve productivity of lab session as errors in the circuit can be rectified earlier.