DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

Similar documents
COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Sequential Circuits: Latches & Flip-Flops

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Logic Design. Flip Flops, Registers and Counters

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Lecture 8: Sequential Logic

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

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

Chapter. Synchronous Sequential Circuits

CPS311 Lecture: Sequential Circuits

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

ECE 341. Lecture # 2

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

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

Experiment 8 Introduction to Latches and Flip-Flops and registers

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

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

RS flip-flop using NOR gate

Introduction to Microprocessor & Digital Logic

Rangkaian Sekuensial. Flip-flop

RS flip-flop using NOR gate

Introduction to Sequential Circuits

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Sequential Logic and Clocked 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

LATCHES & FLIP-FLOP. Chapter 7

Flip-Flops and Sequential Circuit Design

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

ELCT201: DIGITAL LOGIC DESIGN

CHAPTER 4: Logic Circuits

Combinational vs Sequential

Asynchronous (Ripple) Counters

Chapter 4. Logic Design

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

MC9211 Computer Organization

Last time, we saw how latches can be used as memory in a circuit

UNIT IV. Sequential circuit

COMP2611: Computer Organization. Introduction to Digital Logic

Unit 11. Latches and Flip-Flops

CHAPTER 1 LATCHES & FLIP-FLOPS

Chapter 5 Synchronous Sequential Logic

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

CHAPTER 4: Logic Circuits

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

Chapter 8 Sequential Circuits

Chapter 11 Latches and Flip-Flops

EE292: Fundamentals of ECE

Sequential Logic Basics

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

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

Module -5 Sequential Logic Design

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

MODULE 3. Combinational & Sequential logic

Engr354: Digital Logic Circuits

Synchronous Sequential Logic

D Latch (Transparent Latch)

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

6. Sequential Logic Flip-Flops

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

ELCT201: DIGITAL LOGIC DESIGN

Review of Flip-Flop. Divya Aggarwal. Student, Department of Physics and Astro-Physics, University of Delhi, New Delhi. their state.

Sequential Logic Circuits

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

ESE 570 STATIC SEQUENTIAL CMOS LOGIC CELLS. Kenneth R. Laker, University of Pennsylvania, updated 25Mar15

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

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

CHAPTER1: Digital Logic Circuits

LAB 7. Latches & Flip Flops

Chapter 5 Sequential Circuits

Synchronous Sequential Logic. Chapter 5

Latches, Flip-Flops, and Registers. Dr. Ouiem Bchir

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

Other Flip-Flops. Lecture 27 1

Computer Systems Architecture

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

INTRODUCTION TO SEQUENTIAL 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.

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

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

Electrical & Computer Engineering ECE 491. Introduction to VLSI. Report 1

Vignana Bharathi Institute of Technology UNIT 4 DLD

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

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

Counters

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

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

ELE2120 Digital Circuits and Systems. Tutorial Note 7

CS 261 Fall Mike Lam, Professor. Sequential Circuits

EET2411 DIGITAL ELECTRONICS

Spring 2017 EE 3613: Computer Organization Chapter 5: The Processor: Datapath & Control - 1

Chapter 6 Digital Circuit 6-5 Department of Mechanical Engineering

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

Chapter 5: Synchronous Sequential Logic

Switching Circuits & Logic Design

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

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

Slide Set 7. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

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

Transcription:

COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS In the same way that logic gates are the building blocks of combinatorial circuits, latches and flip-flops are the building blocks of sequential circuits. While gates had to be built directly from transistors, latches can be built from gates, and flip-flops can be built from latches. This fact will make it somewhat easier to understand latches and flip-flops. Both latches and flip-flops are circuit elements whose output depends not only on the current inputs, but also on previous inputs and outputs. The difference between a latch and a flip-flop is that a latch does not have a clock signal, whereas a flip-flop always does. Latches How can a circuit that is made out of logic gates that is not combinatorial? The answer is feed-back, which means that there are feedback loops in the circuit so that output values depend, indirectly, on themselves. If such feed-back is positive then the circuit tends to have stable states, and if it is negative the circuit will tend to oscillate. A latch has positive feedback. Here is an example of a simple latch. This latch is called SR-latch, which stands for set and reset. Figure below shows the SR latch is made from NAND gates. Flip-Flop Latches are asynchronous, which means that the output changes very soon after the input changes. Most computers today, on the other hand, are synchronous, which means that the outputs of all the sequential circuits change simultaneously to the rhythm of a global clock signal. A flip-flop is a synchronous version of the latch. To complicate the situation even more, there are several fundamental types of flip-flops. But here, only a type called master-slave flip-flop is considered. Also, in addition to the fundamental types of flip-flops, there are minor variations depending on the number of inputs and how they control the state of the flip-flop. Latches and flip-flops are the basic elements for storing information. One latch or flip-flop can store one bit of information. There are basically four main types of latches and flip-flops: SR, D, JK and T. The major differences in these flip-flop types are the number of inputs they have and how they change state. For each type, there are also different variations that enhance their operations. Mohd Uzir Kamaluddin / Aug 2016 page 1

Sequential Logic Circuits Sequential logic is a type of logic circuit whose output depends not only on the present input but also on the history of the input. This is in contrast to combinational logic, whose output is a function of, and only of, the present input. In other words, sequential logic has storage (memory) while combinational logic does not. Sequential logic is therefore used to construct some types of computer memory, other types of delay and storage elements, and finite state machines. Most practical computer circuits are a mixture of combinational and sequential logic. Nearly all sequential logic today is 'clocked' or 'synchronous logic' logic: there is a 'clock' signal, and all internal memory (the 'internal state') changes only on a clock edge. The basic storage element in sequential logic is the flip-flop. The main advantage of synchronous logic is its simplicity. Every operation in the circuit must be completed inside a fixed interval of time between two clock pulses, called a 'clock cycle'. As long as this condition is met (ignoring certain other details), the circuit is guaranteed to be reliable. Synchronous logic also has two main disadvantages, as follows. 1. The clock signal must be distributed to every flip-flop in the circuit. As the clock is usually a highfrequency signal, this distribution consumes a relatively large amount of power and dissipates much heat. Even the flip-flops that are doing nothing consume a small amount of power, thereby generating waste heat in the chip. 2. The maximum possible clock rate is determined by the slowest logic path in the circuit, otherwise known as the critical path. This means that every logical calculation, from the simplest to the most complex, must complete in one clock cycle. One way around this limitation is to split complex operations into several simple operations, a technique known as 'pipelining'. This technique is prominent within microprocessor design, and helps to improve the clock rate of modern processors. In digital electronics, a clocked sequential system is a system whose output depends only on the current state, whose state changes only when a global clock signal changes, and whose next-state depends only on the current state and the inputs. Nearly all digital electronic devices (microprocessors, digital clocks, mobile phones, cordless telephones, electronic calculators, etc.) are designed as clocked sequential systems. Notable exceptions include digital asynchronous logic systems. In particular, nearly all computers are designed as clocked sequential systems. Notable exceptions include analog computers and clock-less CPUs. Typically, each bit of the "state" is contained in its own flip-flop. Combinational logic decodes the state into the output signals. More combinational logic encodes the current state and the inputs into the next-state signals. The next-state signals are latched into the flip-flops under the control of the global clock signal (a wire connected to every flip-flop). JK flip-flop A flip-flop is a device very like a latch in that it is a bi-stable multi-vibrator, having two states and a feedback path that allows it to store a bit of information. The difference between a latch and a flip-flop is that a latch is asynchronous, and the outputs can change as soon as the inputs do (or at least after a Mohd Uzir Kamaluddin / Aug 2016 page 2

small propagation delay). A flip-flop, on the other hand, is edge-triggered and only changes state when a control signal goes from high to low or low to high. This distinction is relatively recent and is not formal, with many authorities still referring to flip-flops as latches and vice versa, but it is a helpful distinction to make for the sake of clarity. The JK flip-flop augments the behavior of the SR flip-flop (J=Set, K=Reset) by interpreting the S = R = 1 condition as a "flip" or toggle command. Specifically, the combination J = 1, K = 0 is a command to set the flip-flop; the combination J = 0, K = 1 is a command to reset the flip-flop; and the combination J = K = 1 is a command to toggle the flip-flop, i.e., change its output to the logical complement of its current value. The JK flip-flop is a universal flip-flop, because it can be configured to work as an SR flip-flop, a D flip-flop, or a T flip-flop. A circuit symbol for a JK flip-flop, where > is the clock input, J and K are data inputs, Q is the stored data output, and Q' is the inverse of Q. The characteristic equation of the JK flip-flop is: corresponding truth table is: CHARACTERISTIC TABLE J K Qn+1 Comment 0 0 Qn No change 0 1 0 Reset (Clear) 1 0 1 Set 1 1 Qn Toggle (Invert) and the D Flip Flop The D Flip Flop is by far the most important of the clocked flip-flops. The D flip-flop tracks the input, making transitions with match those of the input D. The D stands for "data"; this flip-flop stores the value that is on the data line. It can be thought of as a basic memory cell. A D flip-flop can be made from a Set/Reset flip-flop (SR flip-flop) by tying the set to the reset through an inverter. T Flip Flop The T or "toggle" flip-flop changes its output on each clock edge, giving an output which is half the frequency of the signal to the T input. It is useful for constructing binary counters, frequency dividers, and general binary addition devices. It can be made from a J-K flip-flop by tying both of its inputs high. Mohd Uzir Kamaluddin / Aug 2016 page 3

Summary of Flip Flops Conversion of flip-flop from one type to another. 1. Implementing a D flip-flop using JK flip-flop. 2. Implementing a T flip-flop using a JK flip flop. 3. Implementing a JK flip flop using a D flip flop. Using the excitation table for both the JK and T flip flops, the conversion table is created as follows. Mohd Uzir Kamaluddin / Aug 2016 page 4

To determine the input excitation of the T flip flop, a K map is used and the expression is obtained. 4. By the same method, a JK flip flop can be implemented using a D flip flop. 5. A T flip flop from a D flip flop. Exercise: Implement a D flip flop from a T flip flop. Mohd Uzir Kamaluddin / Aug 2016 page 5