Hamming Code,Decoders and D,T-flip flops Prof. Sin-Min Lee Department of Computer Science.

Slides:



Advertisements
Similar presentations
Review: Additional Boolean operations
Advertisements

Chapter 4: Combinational Logic
Combinational Circuits
Functions and Functional Blocks
Prof. Sin-Min Lee Department of Computer Science
التصميم المنطقي Second Course
1 Fundamentals of Computer Science Sequential Circuits.
Digital Logic Chapter 5 Presented by Prof Tim Johnson
Chapter 1 — Computer Abstractions and Technology — 1 Lecture 7 Carry look ahead adders, Latches, Flip-flops, registers, multiplexors, decoders Digital.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
Circuits require memory to store intermediate data
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
CS 151 Digital Systems Design Lecture 21 Analyzing Sequential Circuits.
The Map Method Boolean expressions may be simplified by algebraic means as discussed in Previous lecture However, this procedure of minimization is awkward.
1 Sequential logic networks I. Motivation & Examples  Output depends on current input and past history of inputs.  “State” embodies all the information.
Chapter 7 Henry Hexmoor Registers and RTL
Revision Mid 2 Prof. Sin-Min Lee Department of Computer Science.
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
CHAPTER 3 Digital Logic Structures
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
Sequential Circuits Problems(I) Prof. Sin-Min Lee Department of Mathematics and Computer Science Algorithm = Logic + Control.
Hamming Code, K-maps-Multiplexer Midterm 1 Revision
ETE Digital Electronics
Digital Computer Design Fundamental
Some Useful Circuits Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
Flip Flop
Decoders, Multiplexers and Programmable Logic. MSI and PLD components1 Decoders Next, we’ll look at some commonly used circuits: decoders and multiplexers.
Lecture 23 Final Revision 3. Prof. Sin-Min Lee.
WEEK #9 FUNCTIONS OF COMBINATIONAL LOGIC (DECODERS & MUX EXPANSION)
Sequential Logic Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer Organization and.
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
Chap 4. Sequential Circuits
Chapter 2Basic Digital Logic1 Chapter 2. Basic Digital Logic2 Outlines  Basic Digital Logic Gates  Two types of digital logic circuits Combinational.
IKI c-Decoders, Selectors, etc. Bobby Nazief Semester-I The materials on these slides are adopted from: CS231’s Lecture Notes at UIUC,
Digital Logic Problems (II) Prof. Sin-Min Lee Department of Mathematics and Computer Science.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
Sequential Logic Combinatorial components: the output values are computed only from their present input values. Sequential components: their output values.
מבנה מחשב תרגול 2. 2 Boolean AND Operation Truth Table Equivalent Gate Different notations:
Computer Architecture and Organization Unit -1. Digital Logic Circuits – Logic Gates – Boolean Algebra – Map Simplification – Combinational Circuits –
1Sequential circuit design Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA by Erol Sahin and Ruken Cakici.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
Synchronous Sequential Logic Part I
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
Revision Mid 1 Prof. Sin-Min Lee Department of Computer Science.
Chapter5: Synchronous Sequential Logic – Part 1
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
Digital Design Module 2 Decoder Amit Kumar AP SCSE, GU Greater Noida.
COMBINATIONAL AND SEQUENTIAL CIRCUITS Guided By: Prof. P. B. Swadas Prepared By: BIRLA VISHVAKARMA MAHAVDYALAYA.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
Lecture 9 Sequential Logic Prof. Sin-Min Lee Department of Computer Science.
Prof. Sin-Min Lee Department of Computer Science
And Decoders Prof. Sin-Min Lee Department of Computer Science
FLIP FLOPS.
Reading: Hambley Chapters
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Digital Logic Design Sequential Circuits (Chapter 6)
Digital Design Fundamentals
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Additional Gates and Decoders
Design example: Comparing 2-bit numbers
Multiplexers For the rest of the day, we’ll study multiplexers, which are just as commonly used as the decoders we presented last time. Again, These serve.
ECE 352 Digital System Fundamentals
Multiplexers Next, we’ll study multiplexers, which are just as commonly used as the decoders we presented last time. Again, These serve as examples for.
Digital Electronics and Logic Design
Presentation transcript:

Hamming Code,Decoders and D,T-flip flops Prof. Sin-Min Lee Department of Computer Science

Let us play a game ! A volunteer from the audience? Pick a number, any number, between 1 and 50

Is the Number in Here?

Is the Number in Here?

Is the Number in Here?

Is the Number in Here?

Is the Number in Here?

Is the Number in Here?

And the Number is ….

Decoders Next, we’ll look at some commonly used circuits: decoders and multiplexers. –These serve as examples of the circuit analysis and design techniques from last lecture. –They can be used to implement arbitrary functions. –We are introduced to abstraction and modularity as hardware design principles. We often use decoders and multiplexers as building blocks in designing more complex hardware.

What a decoder does A n-to-2 n decoder takes an n-bit input and produces 2 n outputs. The n inputs represent a binary number that determines which of the 2 n outputs is uniquely true. A 2-to-4 decoder operates according to the following truth table. –The 2-bit input is called S1S0, and the four outputs are Q0-Q3. –If the input is the binary number i, then output Qi is uniquely true. For instance, if the input S1 S0 = 10 (decimal 2), then output Q2 is true, and Q0, Q1, Q3 are all false. This circuit “decodes” a binary number into a “one-of-four” code.

How can you build a 2-to-4 decoder? Follow the design procedures from last time! We have a truth table, so we can write equations for each of the four outputs (Q0-Q3), based on the two inputs (S0-S1). In this case there’s not much to be simplified. Here are the equations: Q0= S1’ S0’ Q1= S1’ S0 Q2= S1 S0’ Q3= S1 S0

A picture of a 2-to-4 decoder

Enable inputs Many devices have an additional enable input, which is used to “activate” or “deactivate” the device. For a decoder, –EN=1 activates the decoder, so it behaves as specified earlier. Exactly one of the outputs will be 1. –EN=0 “deactivates” the decoder. By convention, that means all of the decoder’s outputs are 0. We can include this additional input in the decoder’s truth table:

An aside: abbreviated truth tables In this table, note that whenever EN=0, the outputs are always 0, regardless of inputs S1 and S0. We can abbreviate the table by writing x’s in the input columns for S1 and S0.

Decoders are common enough that we want to encapsulate them and treat them as an individual entity. Block diagrams for 2-to-4 decoders are shown here. The names of the inputs and outputs, not their order, is what matters A decoder block provides abstraction: –You can use the decoder as long as you know its truth table or equations, without knowing exactly what’s inside. –It makes diagrams simpler by hiding the internal circuitry. –It simplifies hardware reuse. You don’t have to keep rebuilding the decoder from scratch every time you need it. These blocks are like functions in programming! Blocks and abstraction Q0= S1’ S0’ Q1= S1’ S0 Q2= S1 S0’ Q3= S1 S0

A 3-to-8 decoder Larger decoders are similar. Here is a 3-to-8 decoder. –The block symbol is on the right. –A truth table (without EN) is below. –Output equations are at the bottom right. Again, only one output is true for any input combination. Q0= S2’ S1’ S0’ Q1= S2’ S1’ S0 Q2= S2’ S1 S0’ Q3= S2’ S1 S0 Q4= S2 S1’ S0’ Q5= S2 S1’ S0 Q6= S2 S1 S0’ Q7= S2 S1 S0

So what good is a decoder? Do the truth table and equations look familiar? Decoders are sometimes called minterm generators. –For each of the input combinations, exactly one output is true. –Each output equation contains all of the input variables. –These properties hold for all sizes of decoders. This means that you can implement arbitrary functions with decoders. If you have a sum of minterms equation for a function, you can easily use a decoder (a minterm generator) to implement that function. Q0= S1’ S0’ Q1= S1’ S0 Q2= S1 S0’ Q3= S1 S0

Design example: addition Let’s make a circuit that adds three 1-bit inputs X, Y and Z. We will need two bits to represent the total; let’s call them C and S, for “carry” and “sum.” Note that C and S are two separate functions of the same inputs X, Y and Z. Here are a truth table and sum-of-minterms equations for C and S = = 10 C(X,Y,Z) =  m(3,5,6,7) S(X,Y,Z) =  m(1,2,4,7)

Here, two 3-to-8 decoders implement C and S as sums of minterms. The “+5V” symbol (“5 volts”) is how you represent a constant 1 or true in LogicWorks. We use it here so the decoders are always active. Decoder-based adder C(X,Y,Z) =  m(3,5,6,7) S(X,Y,Z) =  m(1,2,4,7)

Using just one decoder C(X,Y,Z) =  m(3,5,6,7) S(X,Y,Z) =  m(1,2,4,7) Since the two functions C and S both have the same inputs, we could use just one decoder instead of two.

Multiplexers A combinational circuit that selects info from one of many input lines and directs it to the output line. The selection of the input line is controlled by input variables called selection inputs. They are commonly abbreviated as “MUX”.

Combinational circuit implementation using MUX We can use Multiplexers to express Boolean functions also. Expressing Boolean functions as MUXs is more efficient than as decoders. First n-1 variables of the function used as selection inputs; last variable used as data inputs. If last variable is called Z, then each data input has to be Z, Z’, 0, or 1.

Karnaugh Map Method of Multiplexer Implementation Consider the function: A is taken to be the data variable and B,C to be the select variables.

Example of MUX combo circuit F(X,Y,Z) =  m(1,2,6,7)

4 Basic types of Flip-Flops SR, JK, D, and T JK ff has 2 inputs, J and K need to be asserted at the same time to change the state D ff has 1 input D (DATA), which sets the ff when D = 1 and resets it when D = 0 T ff has1 input T (Toggle), which forces the ff to change states when T = 1 SR ff has 2 inputs, S (set) and R (reset) that set or reset the output Q when asserted

Gated D-Latch Ensures S and R inputs never equal to 1 at the same time Useful in control application where setting or resetting a flag to some condition is needed Stores bits of information Constructed from a gated SR latch and a Data latch

Analysis of Sequential Systems Goal: –Decide the timing and functional behavior from the implementation of a sequential system composed of FFs and logic gates Types: –Functional analysis –Timing analysis

Characteristic Equation of FFs

D Flip-Flop Characteristics :  Synchronous  Avoids the instability of RS flip-flop  Retains its last input value To set the ff, place 1 on D input and pause the CK input To reset, place 1 on D input and pause the CK input DQ+Q Q + = Next State

T Flip-Flop TQ+Q Q Q’ T = 1 force the state change T = 0 state remain the same

T CLK Q1

T CLK Q1

How to use D to implement T Flip-Flop TQ+Q Q Q’ Q T D = TQ’ + T’Q DQ+Q

How to use D to implement T Flip-Flop D = TQ’ + T’Q T

How to use T to implement D Flip-Flop TQ+Q Q Q’ DQ+Q T = DQ’ + D’Q Q D01D

How to use T to implement D Flip-Flop T = DQ’ + D’Q D

Edge and level-triggered Flip Flop Digital circuit often form loops, flip-flops oscillations can Oscillation will not occur because by the time an output change cause an input change, the activating edge of the CK signal will be gone Positive edge triggered – ff responds to a positive going edge of clock Negative edge triggered – responds to a negative-going edge