Top Banner

of 26

LAB-01 HA11026

Apr 14, 2018

Download

Documents

Khairul Yahyah
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/30/2019 LAB-01 HA11026

    1/26

    UNIVERSITI MALAYSIA PAHANGFACULTY OF MANUFACTURING ENGINEERING

    BHM 2313

    DIGITAL ELECTRONICS

    LAB REPORT

    LAB 01 : BINARY NUMBERS AND LOGIC GATES

    March 30, 2013

    NAME : LIM KOK WEE

    STUDENT ID : HA11026

  • 7/30/2019 LAB-01 HA11026

    2/26

    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 commercializedtransistor-transistor logic (TTL) integrated circuits (IC), in

    which each contains two or more logic gates. In addition,

    Boolean Algebra and DeMorgans 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.

  • 7/30/2019 LAB-01 HA11026

    3/26

    Page | 1

    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-on

    experience 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 codeconversion 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) arecommonly 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 DeMorgans Theorem as well in this lab session.

  • 7/30/2019 LAB-01 HA11026

    4/26

    Page | 2

    2.0OBJECTIVES

    The objectives of this lab session are as follows:

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

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

    b. Logic gates in the form of commercialized integrated circuits (IC)c. Constructing truth tables for logic gatesd. Boolean Algebra and DeMorgans Theoreme. Circuit troubleshooting

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

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

    3. To provide opportunity for the students to familiarize with the lab equipmenta. 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, NationalInstruments (NI) Multisim.

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

  • 7/30/2019 LAB-01 HA11026

    5/26

    Page | 3

    3.0PROCEDURES 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.1Binary Generation

    Binary number can be generated by using the switch to toggle between on and offstate of

    LED, which acts as the output to display the binary number generated.

    List of components and instrument

    1. Resistor 1k 4 pieces2. LED4 pieces3. Dual in-line package (DIP) switch4 pieces4. DC Power Supply with its connecting wire1 unit5. Digital Multimeter1 unit6. WireProcedures

    1. Four bits binary number generation circuit is constructed and simulated in Multisimaccording to part of circuit given in the lab sheet as shown in Figure 1.

    Figure 1 shows the part of the circuit given in

    lab sheet.

    Figure 2 shows the simulated circuit in

    Multisim.

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

    3. The circuit is then constructed on a prototype board according to Figure 1 and 2. Thecircuit 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 openand 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 connectedto ground.

    4.

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

  • 7/30/2019 LAB-01 HA11026

    6/26

    Page | 4

    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.2Binary 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 commonanode component as well to make sure the binary numbers are decoded correctly.

    List of components

    1. Resistor 1k 4 pieces2. LED4 pieces3. Dual in-line package (DIP) switch4 pieces4. 7447 IC (Common Anode) 1 unit5. 7-segment display (Common Anode)1 unit6. DC Power Supply with its connecting wire1 unit7. WireProcedures

    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

    Figure 4 shows the constructed circuit in Multisim..

    3. The circuit is simulated using Multisim. The states of LEDs and the outputs of 7-segmentdisplay 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 acommon anode 7-segment display.

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

  • 7/30/2019 LAB-01 HA11026

    7/26

    Page | 5

    b. The output pins (A-G) of the 7447 IC are connected to the input pins (a-g) on thecommon 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. Theoutput of LEDs and 7-segment display is recorded for each combination.

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

    Figure 5 shows the constructed circuit for experiment 1.3.2

    Experiment 1.4TTL 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 gateconstructed 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 pieces2. LED5 pieces3. Dual in-line package (DIP) switch4 pieces4. 7408 Quad 2-input AND gate 1 piece5. 7432 Quad 2-Input OR gate 1 piece6. 7404 Hex Inverter1 piece7. 7400 Quad 2-Input NAND gate 1 piece8. 7402 Quad 2-Input NOR gate 1 piece9. DC Power Supply with its connecting wire1 unit10.Oscilloscope1 unit11.WireProcedures

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

    connected in series with a 1k Resistor. The output is then measured with anoscilloscope.

  • 7/30/2019 LAB-01 HA11026

    8/26

    Page | 6

    2. The circuit is simulated using Multisim. The output of LED state and oscilloscope isrecorded 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.

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

    Figure 7 shows the constructed circuit for 7425

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

    equivalent 7425 Dual 4-input NOR gate on

    prototype board.

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

    1k Resistor and a LED.

    a. Oscilloscope is set up and the positive of X10 probe is connected to the output ofthe 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 differentinput 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.5Truth 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

  • 7/30/2019 LAB-01 HA11026

    9/26

    Page | 7

    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 pieces2.

    LED3 pieces3. Dual in-line package (DIP) switch2 pieces

    4. 7408 Quad 2-input AND gate 1 piece5. 7432 Quad 2-Input OR gate 1 piece6. 7400 Quad 2-Input NAND gate 1 piece7. DC Power Supply with its connecting wire1 unit8. WireProcedures

    1. Circuits for 7408 AND gates from previous experiment is constructed without presence ofoscilloscope 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.

    Figure 9 shows the constructed circuit for 7408

    Quad 2-input AND gate in Multisim.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 ofoscilloscope in prototype board.

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

    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 pieces2. LED2 pieces3. Dual in-line package (DIP) switch1 piece4. 7400 Quad 2-Input NAND gate 1 piece5. DC Power Supply with its connecting wire1 unit6. Wire

  • 7/30/2019 LAB-01 HA11026

    10/26

    Page | 8

    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.

    Figure 11 shows the constructed circuit

    for experiment 1.5.1 in Multisim.

    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 ismodified. 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 willact 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.2This 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 piece2. Variable resistor 1k 1 piece3. LED1 piece4. 7400 Quad 2-Input NAND gate 1 piece5. DC Power Supply with its connecting wire1 unit6. Digital Multimeter1 unit7. WireProcedures

    1. The circuit is modified from the previous experiment in Multisim. 1k resistor in theinput 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 andmeasured 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 inexperiment 1.5.1. LED and DIP switch are removed.

  • 7/30/2019 LAB-01 HA11026

    11/26

    Page | 9

    a. The end of variable resistor is connected to Vcc = 5V and ground, leaving thevoltage 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 thatchanges the state of output LED.

    Figure 13 shows the constructed circuit

    for experiment 1.5.2 in Multisim.

    Figure 14 shows the constructed circuit for

    experiment 1.5.2 on a prototype board

    Experiment 1.6Universal 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 pieces2. LED3 pieces3. Dual in-line package (DIP) switch2 pieces4. 7400 Quad 2-Input NAND gate 1 piece5. DC Power Supply with its connecting wire1 unit6. WireProcedures

    1.

    The logic expression of the NAND gates equivalent to OR gate is derived usingDeMorgans Theorem.

    A + B = .

    = + = A + B

    2. The circuit is similar to experiment 1.4. The circuit is constructed in Multisim by placing2 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.

  • 7/30/2019 LAB-01 HA11026

    12/26

    Page | 10

    Figure 15 shows the constructed circuit for

    experiment 1.6 in Multisim

    Figure 16 shows the constructed circuit for

    experiment 1.6 on prototype board

    Experiment 1.6.1Constructing 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 pieces2. LED3 pieces3. Dual in-line package (DIP) switch2 pieces4. 7402 Quad 2-Input NOR gate 1 piece5. DC Power Supply with its connecting wire1 unit6. WireProcedures

    1. The logic expression of the NOR gates equivalent to AND gate is derived usingDeMorgans Theorem.A . B = +

    = . = A . B

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

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

    Figure 17 shows the constructed circuit for

    experiment 1.6.1 in Multisim

    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 circuitshown 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.

  • 7/30/2019 LAB-01 HA11026

    13/26

    Page | 11

    Experiment 1.6.2Constructing 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 pieces2. LED3 pieces3. Dual in-line package (DIP) switch2 pieces4. 7400 Quad 2-Input NAND gate 1 piece5. DC Power Supply with its connecting wire1 unit6. WireProcedures

    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.

    Figure 19 shows the constructed circuit for

    experiment 1.6.2 in Multisim.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 circuitshown 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.

  • 7/30/2019 LAB-01 HA11026

    14/26

    Page | 12

    4.0RESULTS AND ANALYSIS

    Experiment 1.3.1Binary 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 equivalentcircuits 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 24 = 16 combinations of

    input (0000, 0001, , 1111) according to this equation, number of combination = 2n, 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

    number

    Binary

    number

    Switch; LED

    1 State (MSB)

    Switch; LED

    2 State

    Switch; LED

    3 State

    Switch; LED

    4 State (LSB)

    0 0000 On ; Off On ; Off On ; Off On ; Off

    1 0001 On ; Off On ; Off On ; Off Off ; On2 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 ; On12 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)

  • 7/30/2019 LAB-01 HA11026

    15/26

    Page | 13

    Experiment 1.3.1Binary 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

    number

    Binary display segment Expected

    decimal

    Observed

    decimal

    Simulated and circuit

    outputa b c d e f g

    0000 on on on on on on off 0 0

    0001 off on on off off off off 1 1

    0010 on on off on on off on 2 2

    0011 on on on on off off on 3 3

    0100 off on on off off on on 4 4

  • 7/30/2019 LAB-01 HA11026

    16/26

  • 7/30/2019 LAB-01 HA11026

    17/26

    Page | 15

    1011 off off on on off off on

    1100 off on off off off on on

    1101 on off off on off on on

    1110 off off off on on on on

    1111 off off off off off off off No

    display.

    No 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.

  • 7/30/2019 LAB-01 HA11026

    18/26

    Page | 16

    Experiment 1.4Logic 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 gateshould produce the same truth table for 7425 Dual 4-input NOR logic gate.

    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 foroscilloscope is low voltage for output of 7425 NOR gate as all inputs are high (1111).

    (a) (b) (c) (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 10

    High 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 theres 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 shownin Table 4.

  • 7/30/2019 LAB-01 HA11026

    19/26

    Page | 17

    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 Low7421 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 Low1 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 Low0 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 Low1 1 1 1 0 Low

  • 7/30/2019 LAB-01 HA11026

    20/26

    Page | 18

    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 Low1 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.5Truth 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 Table 6shows the truth table for 7432 OR gate

    Input Output Circuit output

    A B Y = A . B

    0 0 0

    0 1 0

    1 0 0

    1 1 1

    Input Output Circuit output

    A B Y = A + B

    0 0 0

    0 1 1

    1 0 1

    1 1 1

  • 7/30/2019 LAB-01 HA11026

    21/26

    Page | 19

    Table 7 shows the truth table for 7400 NAND gate

    Input Output Circuit output

    A B Y = . 0 0 1

    0 1 1

    1 0 1

    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

    1 0

  • 7/30/2019 LAB-01 HA11026

    22/26

    Page | 20

    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 LOWregion can be determined.

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

    Output state

    of LED

    Input voltage Resistance Circuit output

    On Minimum input voltage

    (LOW)

    3.9 mV 1068

    0.975 V 876

    Off Undefined region

    (Start)

    1.151 V 833

    Minimum input voltage

    (HIGH)

    undefined undefined -

    Maximum input voltage

    (HIGH)

    4.97 V 3

  • 7/30/2019 LAB-01 HA11026

    23/26

    Page | 21

    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 fromdatasheet (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.6Universal 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 usingDeMorgans 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 1 1 0 1 1

    1 0 1 1 0 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.

  • 7/30/2019 LAB-01 HA11026

    24/26

    Page | 22

    Experiment 1.6.1Constructing 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.

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

    DeMorgans Theorem is shown below :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 1 0 0 1 0

    1 0 0 1 0 0

    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.2Constructing XOR gate using NAND gate

    As the previous discussion stated, NAND gate is one of the universal gates. XOR gate can beconstructed by using NAND gates only with the given logic expression, Q =(A. ) .(B. )

    .

  • 7/30/2019 LAB-01 HA11026

    25/26

    Page | 23

    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 1 1 0 1 1

    1 0 1 1 0 1

    1 1 0 1 1 0

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

  • 7/30/2019 LAB-01 HA11026

    26/26

    5.0CONCLUSION

    Fundamental of digital electronics covers number systems, logic gates, DeMorgansTheorem 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

    DeMorgans 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 DeMorgans Theorem is once again applied. In order to construct acorrect 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.