EXPERIMENT 13 ITERATIVE CIRCUITS

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

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output

MODULE 3. Combinational & Sequential logic

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

CHAPTER 4: Logic Circuits

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

Chapter 2. Digital Circuits

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

Digital Fundamentals: A Systems Approach

Chapter 4. Logic Design

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

Midterm Examination II

Lecture 8: Sequential Logic

Physics 323. Experiment # 10 - Digital Circuits

Logic Design II (17.342) Spring Lecture Outline

CHAPTER 4: Logic Circuits

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

MC9211 Computer Organization

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

Chapter 6 Registers and Counters

RS flip-flop using NOR gate

EE292: Fundamentals of ECE

4.1* Combinational logic circuits implement logic functions using a combination of logic gates. Recall

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

SEMESTER ONE EXAMINATIONS 2002

ME 515 Mechatronics. Introduction to Digital Electronics

Chapter 3 Unit Combinational

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

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

Principles of Computer Architecture. Appendix A: Digital Logic

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

Digital Circuits 4: Sequential Circuits

CS T34-DIGITAL SYSTEM DESIGN Y2/S3

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

Module -5 Sequential Logic Design

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

Counters

Chapter Contents. Appendix A: Digital Logic. Some Definitions

Logic Design. Flip Flops, Registers and Counters

Sequential Logic Notes

Engineering College. Electrical Engineering Department. Digital Electronics Lab

UNIT IV. Sequential circuit

QUICK GUIDE COMPUTER LOGICAL ORGANIZATION - OVERVIEW

Experiment 8 Introduction to Latches and Flip-Flops and registers

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

Combinational Logic Design

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

Unit 11. Latches and Flip-Flops

TYPICAL QUESTIONS & ANSWERS

Decade Counters Mod-5 counter: Decade Counter:

Department of Electrical Engineering University of Hail Ha il - Saudi Arabia

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

Lecture 12. Amirali Baniasadi

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

VU Mobile Powered by S NO Group

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

EKT 121/4 ELEKTRONIK DIGIT 1

Asynchronous (Ripple) Counters

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

EECS 270 Midterm Exam Spring 2011

CHAPTER 6 COUNTERS & REGISTERS

ECE Lab 5. MSI Circuits - Four-Bit Adder/Subtractor with Decimal Output

Computer Architecture and Organization

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

CHAPTER 1 LATCHES & FLIP-FLOPS

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

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

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

Digital Circuits I and II Nov. 17, 1999

RS flip-flop using NOR gate

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

REPEAT EXAMINATIONS 2002

EET2411 DIGITAL ELECTRONICS

Digital Logic Design ENEE x. Lecture 19

Universal Asynchronous Receiver- Transmitter (UART)

Registers and Counters

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

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

Logic Design II (17.342) Spring Lecture Outline

Logic Design Viva Question Bank Compiled By Channveer Patil

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

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

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

Synchronous sequential circuits

CHAPTER1: Digital Logic Circuits

Sequential Logic Circuits

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

CprE 281: Digital Logic

FE REVIEW LOGIC. The AND gate. The OR gate A B AB A B A B 0 1 1

Department of CSIT. Class: B.SC Semester: II Year: 2013 Paper Title: Introduction to logics of Computer Max Marks: 30

INC 253 Digital and electronics laboratory I

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

Contents Circuits... 1

CSE 352 Laboratory Assignment 3

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

Digital Logic Design I

Transcription:

EE 2449 Experiment 13 Revised 4/17/2017 CALIFORNIA STATE UNIVERSITY LOS ANGELES Department of Electrical and Computer Engineering EE-246 Digital Logic Lab EXPERIMENT 13 ITERATIVE CIRCUITS Text: Mano, Digital Design, Ch's 3, 4 and 6. Required chips: 7476: JK-flipflops (2 chips), and some or all of: 7402: NOR, 7408: AND, 7432: OR, 7486: XOR. 13.1* First read the background discussion in Appendix 1 on iterative circuits, then continue here. One of the simplest forms of an iterative circuit is a chain in which each stage is just an AND gate with 2 inputs, one parallel and one serial, and a serial output. Similar chains can be constructed of OR or XOR gates. You might use such a chain instead of a single large gate. Thus, a string of 16 AND gates could replace a single 16-input AND, since such large gates are not available in SSI or MSI chips. As discussed in Appendix 1, the relatively long time delay could be a disadvantage. One possible application for a such a chain of AND gates would be an "All-High" detector. The output of the chain would go high only when all parallel inputs are high. (The serial input to the first gate must always be high; i.e. 5V). This really amounts to single large AND distributed along a chain. Do this in lab: create an "All-Low" detector using a chain of 4 gates, such that the output of the chain goes low only when all parallel inputs are low. (Here the serial input to the first gate must always be low; i.e. ground.) Assume inputs, X3..X0 from switches. Use 1 chip (with what kind of gates?). Connect the output of the chain to an LED. Demonstrate the circuit for your instructor. ------------------------------------------------------------------------------------------------------------------------------

Exp.13 (pg.2) 13.2* Build a simplified Iterative Comparator: this circuit will be an inequality detector. It will compare two 4-bit numbers, X = (X3..X0) and Y = (Y3..Y0) using a chain of four identical stages. Each stage contains two different gates, one in parallel, the other in series. The output of the chain should go high if the two numbers are different. (The circuit won't detect which is larger, just whether they are unequal.) The upper gate checks to see if its two parallel inputs, Xn and Yn, are the same. If so, it outputs a 0; if they are different, it outputs a 1. (What kind of gate will do this?) The lower gate combines this output along with the output of the previous stage, Zn, and passes it up the chain as Zn+1. If even one input to the lower gate equals 1, then Zn+1 should equal 1. And if this happens at any stage in the chain, then the output of the entire chain (connected to an LED) will also equal 1 (why?). This indicates that at least one pair of Xn- Yn components do not match, so X and Y themselves must be unequal. Zn+1 X Y Zn Question: should the serial input to the first stage be a 1 or a 0? Be prepared to justify your choice. Your design should use 2 chips only. Try to make all stages identical so additional stages could be added at either end. (Can you see how this circuit incorporates an "All-Low" detector?) Draw the circuit with schematic-capture software. Build it with the 4-bit inputs X and Y coming from switches. Test it first with X = Y (all bit pairs equal) and then with X Y (at least one pair different). Demonstrate circuit behavior for your instructor. ------------------------------------------------------------------------------------------------------------------------------------------------------- 13.3 Iterative Up/Down Counter: (design only). Read Appendix 2 on up-counters, then continue here. The circuit below is a 2-bit up-down counter; it counts up 0-1-2-3-0-etc. or down 3-2-1-0-3-etc.. When CE = 0, counting stops; when CE = 1, counting proceeds. When SEL = 0, the counter counts up; when SEL = 1, it counts down. (NOTE: For something similar to the SEL control used here, refer to Exp 6.2. There a select input changes a circuit from an adder to a subtractor.) These flip-flops act like T's because J=K. Assume flip-flop CLKs are connected to a pulser. Also, except when flip-flop outputs A1A0 are intitially cleared to 00, the CLR inputs should be connected to Vcc (i.e. made inactive) along with the PRE inputs.

Exp.13 (pg.3) The circuit inside the dashed block (flip-flop A0 and the two gates) is the iterative module. If the counter had more than two flipflops, then each one, except the last (at the left), would look exactly like A0's circuit. This would require that the wire from the SEL input be continued across the whole counter. Because this is only a 2-bit counter, the last flipflop, A1, doesn't need any gates since there is nothing to its left. Note that if count is enabled (CE=1), then T0 must equal 1 since the least-significant bit of any counter (A0 in this case) always toggles when the clock comes. The question is what happens to A1 when count is enabled and the clock comes--when does it toggle and when not. The answer depends both on A0 and SEL. 1) In the state table at the right, assume CE = 1, which means that T0 is always 1. Fill in the values for T1 and for the nextstate values of A1 A0 based on an analysis of the given circuit. Your answers should show whether the circuit is an up-down counter. Explain your results to your instructor. Next-state values for A1 A0 must be consistent with the values of T1 you show in the table. 2) Find the rule for down-counters, similar to the one in Appendix 2 for up-counters, from the following 2- count sequence, shown in binary and decimal: 1 0 1 1 0 0 0 0 176 1 0 1 0 1 1 1 1 175 Here, again, the flipflops that toggled are underlined. In a down-counter, the last one always toggles (same as in an up-counter). But what rule explains why the other four toggled? Make sure you give a clear answer to this question in your report.

APPENDIX 1 ITERATIVE CIRCUITS Exp.13 (pg.4) An iterative circuit consists of a chain of identical modules or input stages. Stages can be sequential or combinatorial (i.e. with or without flipflops). Each module can have parallel and serial inputs and outputs. The serial inputs and outputs propagate information from one stage to the next along the chain. This diagram consists of a chain of AND gates Consider, for example, an N-bit iterative adder consisting of N identical full-adder stages. The 4-bit adder/subtractor in the textbook (Fig. 4-13) is a case in point. Each stage includes parallel inputs An, Bn, and an output sum bit, Sn. There are also serial input and output carries, Cn and Cn+1, which carry information from stage to stage. The advantage to an iterative circuit is ease of design and construction. Designing a full-adder stage with 3 inputs and 2 outputs requires a truth-table with only 3+2 = 5 columns and 2 3 = 8 rows. Once designed, one has only to string together as many stages as desired; i.e. a 4-bit adder would require 4 identical full-adder stages--that's the whole design. Contrast this with designing the entire 4-bit adder at once. It would take a truth-table with 9 input columns (A3..A0, B3..B0, and C0), 5 output columns (S3..S0 and C4), and 2 9 = 512 rows! (Designing an 8- or 16-bit adder this way would be infinitely worse.) The price you pay for ease of design is lower speed of operation. In each full-adder stage, the carry must propagate through two gates (see diagram in textbook). There is a small time delay associated with each gate on the order of, say, 10 nanosec's. Now consider the case of a 16-stage iterative adder performing the following sum: A 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 The carry generated by A0+B0 = 1+1 must "ripple" up the chain through 15 more stages before the sum stabilizes at all 0's. This can take something like 16 2 10 = 320 nanosec's or 0.32 s, which is a long time for many applications. It means that none of the inputs (An or Bn) should change more often than once per 0.32 s or 3 times per s. In other words, the data rate into the adder must be less than 3MHz. For highspeed circuits (like microprocessors) this is much too slow. To avoid this kind of problem, most commercial adder chips, like the 7483 used in Experiment 6, have extra "look-ahead" carry circuitry which brings carry information immediately to all stages so there is no need to wait for it to ripple up the chain. One could chain four 7483's together and thereby take advantage of this fast look-ahead carry feature to drastically reduce overall delay in a 16-bit design.

Exp.13 (pg.5) APPENDIX 2 ANALYSIS OF AN UP-COUNTER Refer to the diagram of Fig. 6-12 in the text. This is a 4-bit iterative up-counter, each stage of which consists of a JK-flipflop connected as a "T" (i.e. J = K) plus a 2-input AND which is part of a chain of gates. The serial input to each stage comes from the chain of ANDs and goes to the J-K inputs. (The output-carry gate at the bottom is positioned differently than the other ANDs but is just a continuation of the chain.) Now look at any stage in the chain. When the output of the chain of gates going into that stage is high, the flipflop will toggle on the next clock, since J=K=1. This happens only when the outputs of all previous flipflops are high. For example, A3 toggles only when A2=A1=A0=1. On the other hand, if at least one of the previous flipflops is low, A3 will not change state, since J=K=0. To see where this rule comes from, observe the following two consecutive count states in an 8-bit counter: Binary Decimal 1 0 1 0 1 1 1 1 175 1 0 1 1 0 0 0 0 176 The underlined 5 bits represent flipflops which changed state. The least-significant bit always toggles in a counter, but the other 4 toggled because, in each case, all the bits to their right were 1's. The first 3 flipflops did not toggle because each had at-least-one 0 to its right. Since this is the way counting is done in base-2, the counter must be designed accordingly. ------------------------------------------------------------------------------------------------------------------------------