PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

Similar documents
AIM: To study and verify the truth table of logic gates

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

MODULE 3. Combinational & Sequential logic

WINTER 15 EXAMINATION Model Answer

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

Digital Networks and Systems Laboratory 2 Basic Digital Building Blocks Time 4 hours

Physics 323. Experiment # 10 - Digital Circuits

Contents Circuits... 1

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops

Analogue Versus Digital [5 M]

Computer Systems Architecture

ME 515 Mechatronics. Introduction to Digital Electronics

Other Flip-Flops. Lecture 27 1

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date:

TRAINING KITS ON DIGITAL ELECTRONIC EXPERIMENTS. Verify Truth table for TTL IC s AND, NOT, & NAND GATES

1 Hour Sample Test Papers: Sample Test Paper 1. Roll No.

LATCHES & FLIP-FLOP. Chapter 7

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

Tribhuvan University Institute of Science and Technology Bachelor of Science in Computer Science and Information Technology

1. Convert the decimal number to binary, octal, and hexadecimal.

UNIVERSITI TEKNOLOGI MALAYSIA

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

Dev Bhoomi Institute Of Technology Department of Electronics and Communication Engineering PRACTICAL INSTRUCTION SHEET

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Laboratory 10. Required Components: Objectives. Introduction. Digital Circuits - Logic and Latching (modified from lab text by Alciatore)

Logic Design Viva Question Bank Compiled By Channveer Patil

R13. II B. Tech I Semester Regular Examinations, Jan DIGITAL LOGIC DESIGN (Com. to CSE, IT) PART-A

Principles of Computer Architecture. Appendix A: Digital Logic

Experiment 8 Introduction to Latches and Flip-Flops and registers

EET2411 DIGITAL ELECTRONICS

Synchronous Sequential Logic

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

Today 3/8/11 Lecture 8 Sequential Logic, Clocks, and Displays

Experiment # 4 Counters and Logic Analyzer

Digital Circuits I and II Nov. 17, 1999

Minnesota State College Southeast

CHAPTER 4: Logic Circuits

Combinational Logic Design

Logic Design. Flip Flops, Registers and Counters

Laboratory Objectives and outcomes for Digital Design Lab

FUNCTIONS OF COMBINATIONAL LOGIC

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

B. Sc. III Semester (Electronics) - ( ) Digital Electronics-II) BE-301 MODEL ANSWER (AS-2791)

Chapter 2. Digital Circuits

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

Computer Architecture and Organization

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

Chapter Contents. Appendix A: Digital Logic. Some Definitions

Experiment (6) 2- to 4 Decoder. Figure 8.1 Block Diagram of 2-to-4 Decoder 0 X X

DIGITAL ELECTRONICS MCQs

Chapter 5: Synchronous Sequential Logic

DepartmentofElectronicEngineering NEDUniversity ofengineering &Technology LABORATORY WORKBOOK DIGITAL LOGIC DESIGN (TC-201)

Engineering College. Electrical Engineering Department. Digital Electronics Lab

TYPICAL QUESTIONS & ANSWERS

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) WINTER 2018 EXAMINATION MODEL ANSWER

WINTER 14 EXAMINATION

IT T35 Digital system desigm y - ii /s - iii

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

CHAPTER 4: Logic Circuits

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

Chapter. Synchronous Sequential Circuits

RS flip-flop using NOR gate

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

10.1 Sequential logic circuits are a type of logic circuit where the output of the circuit depends not only on

DIGITAL ELECTRONICS LAB MANUAL FOR 2/4 B.Tech (ECE) COURSE CODE: EC-252

Laboratory 7. Lab 7. Digital Circuits - Logic and Latching

DIGITAL CIRCUIT COMBINATORIAL LOGIC

Combinational vs Sequential

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

Chapter 3: Sequential Logic Systems

TIME SCHEDULE. MODULE TOPICS PERIODS 1 Number system & Boolean algebra 17 Test I 1 2 Logic families &Combinational logic

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

Synchronous Sequential Logic

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Unit 11. Latches and Flip-Flops

Chapter 4. Logic Design

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

Introduction to Sequential Circuits

LAB #4 SEQUENTIAL LOGIC CIRCUIT

OFC & VLSI SIMULATION LAB MANUAL

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

1. True/False Questions (10 x 1p each = 10p) (a) I forgot to write down my name and student ID number.

North Shore Community College

Sequential Logic Circuits

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

CprE 281: Digital Logic

[2 credit course- 3 hours per week]

Half-Adders. Ch.5 Summary. Chapter 5. Thomas L. Floyd

CHAPTER 1 LATCHES & FLIP-FLOPS

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

Transcription:

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops Objective Construct a two-bit binary decoder. Study multiplexers (MUX) and demultiplexers (DEMUX). Construct an RS flip-flop from discrete gates. Study the D-latch and J-K flip-flop. Explore the applications of using latches, decoders, MUX s, and DEMUX s. Introduction In this lab we explore some relatively simple digital circuits, many of which are available in a single chip. We consider flip-flops, which are the basic building blocks of all memory systems and study the encoders/decoders, multiplexers (data selectors) and demultiplexers (data distributors). We will explore some applications of flip-flops, latches and MUX s/demux s. Decoders and Encoders A decoder circuit takes information presented in one form and converts it into another form. There are many different kinds of decoders. The most common examples are decoders that convert binary numbers into BCD (binary coded decimal) numbers (IC chips 74184) and BCD numbers into binary numbers (IC chips 74185). Another commonly found decoder circuit is a BCD to seven segment decoder used in driving the signal for seven-segment LED displays. An encoder is the opposite of a decoder. Multiplexers and Demultiplexers A multiplexer or data selector is the electrical analog of a rotary multiposition mechanical switch. It can select any of several input lines and direct that input line to a single output terminal. A MUX has n input selection lines (address lines) and 2 n input lines which can be connected to the single output line. For example, an 8-input MUX has n = 3 selection (address) lines and can connect any one of the 8 inputs to the single output. The inverse of the multiplexer is the demultiplexer or data distributor. It is also like a rotary mechanical switch except the information flow is from the single input to one of the 2 n output lines selected by n address lines. Flip-Flops and Latches A flip-flop is essentially any circuit with two output terminals and two stable voltage states (one higher than the other) for each terminal. A flip-flop is a 1

basic binary storage element which holds or latches binary information indefinitely (as long as power is delivered to the circuit) until directed by an input signal to switch the states. These devices are very useful in detecting occurrences of an event and counting the number of events occurred. There is no general agreement on which names should be used for these devices. Some refer to them as flip-flops, and others call them latches. Experiment 9.1 Two-Bit Binary Decoder A A 2x4 Decoder B B Figure 1: 2 Bit Binary Decoder. Construct the two-bit binary decoder in Figure 1 using four NAND gates and two NOT gates. Connect the outputs D 0,D 1,D 2,D 3 to 4 LED s with 220Ω series resistors. Measurement 1 Determine the truth table by observing the LED indicators for all input combinations. 9.2 An Eight Input Multiplexer (MUX) The 74LS151 MUX has eight data input lines and three address lines to select the desired data input, as in Figure 2. There is also an enable (E) input and only when this is connected to ground (LOW) the selected input is connected to the output line. This type of signal is called active low. Connect the circuit as shown. Connect the output Q to one of the LED indicators and E to ground so that the selected input is always passed on to the output line. Select an address (000 to 111) by setting the address lines. Connect 5Hz TTL pulses to all input lines in 2

16 4 3 +5V Q 5 Q 6 Outputs 2 Inputs D4 D5 D6 D7 8x1 Mux A2 A1 A0 Output Inputs 1 15 14 13 12 D4 D5 D6 D7 E A0 A1 A2 GND 11 10 9 7 8 Figure 2: Eight Input MUX: 74LS151. succession and see which one is passed on to the output line. When you connect the TTL pulses to the line selected the LED should blink at 5Hz Measurement 2 Fill in a complete truth table for the address lines and the input/output data lines. Applications We can think of using standard gates, encoders/decoders, and MUX s/demux s in several interesting applications. Here are some examples: 9.3 Gating Pulses You can control one pulse with another by a technique called gating. One pulse can be used to control, or gate, one or more other pulses. Connect one AND gate input to a 1Hz TTL clock output and the other AND gate input to a wire which you can connect either to +5V or ground. Connect the output of the AND gate to one LED indicator and the clock to another LED indicator. Include a 220Ω resistor in series with the LED. Measurement 3 Sketch the output for the control signal shown in Figure 3. Describe your observations. 3

CLOCK CONTROL OUTPUT time (t) Figure 3: Pulse Gating. 9.4 Prime Number Detector Circuit Here is a logic circuit, Figure 4, using basic gates that takes in a 3-bit binary number A 2 A 1 A 0 and produces a single output X that is true if the input represents a prime number between 0 and 7. A 2 A 1 A 0 X Figure 4: Prime Number Detector Circuit. Measurement 4 Connect and check the circuit. Report your observations in a truth table that includes binary numbers that you put in, its equivalent decimal number and the output, X. Question 1 Using first the truth table and then the logic schematic, show that X = A 2 A 1 +A 0. Question 2 Can you think of a way to implement the above prime number detector using a 1 8 DEMUX(74138 IC)? Draw its circuit diagram. 4

A n B n C on C in S n Figure 5: Full Adder Circuit. 9.5 Full Adder All modern digital computers are essentially very high speed adding machines and memory circuits designed to handle numbers in binary form. This often requires addition of two digits and a carry from a previous stage (a total of three binary digits) and produces a sum and carry-out bits. We can accomplish this by a digital circuit that is usually called a full adder. A half adder adds only two digits and doesn t take a carry-in. It is only good for adding the least significant digits of two binary numbers. Measurement 5 Construct the full adder in Figure 5 and check the truth table. Question 3 Work out the Boolean expressions for C on and S n from the logic circuit. Flip-Flops 9.6 The Simple RS Flip-Flop with Two NAND Gates S Q R Q' Figure 6: RS Flip-Flop. Construct an RS flip-flop from two NAND gates of the 7400 IC as shown in Figure 6. Connect the outputs Q and Q to two LED indicators. 5

Measurement 6 By applying HIGH and LOW logical levels to S and R inputs, determine and write out the truth table. The RS flip-flop constructed from NAND gates changes state by bringing LOW the input of the NAND gate which had both inputs HIGH. Hence the bars on the inputs R and S. Question 4 Does a HIGH to both S and R change the output Q and Q from their previous levels. Explain your answer. Question 5 What happens when both S and R are LOW? Should such a condition be allowed in a circuit? Explain. 9.7 The Clocked Data Latch or D-Flip-Flop The output of the RS flip-flop responds immediately to input changes, except for a small delay (gate delay) caused by the time taken for the current to flow through the transistor switches. These uncontrolled delays can play havoc in complex digital circuits. This problem is solved by having a system clock. In clocked digital circuits the changes occur through the system, in unison, only when the clock allows it to. The output of the clocked flip-flops respond to input only when the clock pulse (CLK) input changes. The 7474 (see data sheet) is a dual D-latch that passes data from input (D) when the CLKchanges from LOW to HIGH. For this reason it is called a positive edge triggered or rising edge triggered latch. The 7474 IC also is provided with switches for immediate response. These are labeled as PR and CLR. Again, the inversion bars on PRand CLRindicate that these inputs are active low. Construct the circuit with one of the D-latches from the 7474 IC as shown. The clock pulses can be easily created by a push button switch. Connect a 1kΩ resistor between +5V and the normally-closed position of the push button. Use +5V and 0V as the input to D and connect CLKto the normally-open position of the push button. Connect the outputs Q and Q to two LED indicators. Measurement 7 Verify that the input does not change the output until CLKgoes HIGH. Check that Q goes HIGH immediately if you make PR LOW and Q goes LOW immediately if you make CLR LOW. Draw a timing diagram for the operation of the D-latch. 9.8 The JK Flip-Flop The simple RS flip-flop constructed from NAND gates cannot handle both inputs simultaneously LOW since it produces unpredictable results. The JK flip-flop overcomes this problem. 6

The JK flip-flop has two inputs, labeled J and K, that affect the outputs Q and its complement Q synchronously with the clock inputs. Some JK flip-flops have preset and clear inputs that make the output go HIGH or LOW immediately. These are also called direct (pre-)set and direct clear inputs. The 7476 IC (see data sheet) is a dual JK latch and has direct preset and clear inputs. This JK latch is negative-edge or falling-edge triggered. This is indicated by a small open circle at the CLKinput. Connect the J and K inputs to +5V or 0V and CLKto a push button switch with normallyclosed pin to 0V and normally-open pin to +5V. Connect Q and Q to an LED indicator and 220Ω series resistor. Table 1: Truth Table for testing the JK Flip-Flop. J K Q n Q n+1 Q n+1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Measurement 8 Complete the truth table, Table 1, for all input combinations, pushing the switch to toggle the clock pulse and cause the flip-flop to change state. Note that Q n is the value of Q before the clock cycles and Q n+1 is the state of the output after the clock cycles. Question 6 Summarize your observations about the behavior of the JK flip-flop as follows: The output changes when CLKgoes. When both J = K = 0, the output. When J = 0 and K = 1, the output. When J = 1 and K = 0, the output. When J = K = 1, the output. 7