Mealy & Moore Machines

Similar documents
UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

Boolean Logic Prof. James L. Frankel Harvard University. Version of 3:20 PM 29-Aug-2017 Copyright 2017, 2016 James L. Frankel. All rights reserved.

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Fundamentals of Digital Design

Gates and Flip-Flops

The Design Procedure. Output Equation Determination - Derive output equations from the state table

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Sequential Synchronous Circuit Analysis

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

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

Topic 8: Sequential Circuits

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

ECE380 Digital Logic. Synchronous sequential circuits

CHAPTER 7 MULTI-LEVEL GATE CIRCUITS NAND AND NOR GATES

EGC221: Digital Logic Lab

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Chapter 14 Sequential logic, Latches and Flip-Flops

Different encodings generate different circuits

Analysis and Design of Sequential Circuits: Examples

Using the NOT realization from the NAND, we can NOT the output of the NAND gate making it a NOT NOT AND or simply an AND gate.

Synchronous Sequential Logic

Sequential Logic Circuits

Finite State Machine (FSM)

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

Clocked Synchronous State-machine Analysis

Sequential vs. Combinational

EE 209 Logic Cumulative Exam Name:

BER KELEY D AV IS IR VINE LOS AN GELES RIVERS IDE SAN D IEGO S AN FRANCISCO

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

Chapter 3 Combinational Logic Design

Topic 8: Sequential Circuits. Bistable Devices. S-R Latches. Consider the following element. Readings : Patterson & Hennesy, Appendix B.4 - B.

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

Chapter 4. Sequential Logic Circuits

Overview of Chapter 4

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

ENGR4300 Fall 2005 Test 3A. Name. Section. Question 1 (25 points) Question 2 (25 points) Question 3 (25 points) Question 4 (25 points)

Sequential Circuit Design

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

Lecture 7: Logic design. Combinational logic circuits

Logical design of digital systems

Additional Gates COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

DESIGN AND IMPLEMENTATION OF ENCODERS AND DECODERS. To design and implement encoders and decoders using logic gates.

Logic Gate Level. Part 2

FYSE420 DIGITAL ELECTRONICS

Lab #10: Design of Finite State Machines

Computer Organization I. Lecture 13: Design of Combinational Logic Circuits

Chapter 2 Combinational Logic Circuits

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

CprE 281: Digital Logic

1.10 (a) Function of AND, OR, NOT, NAND & NOR Logic gates and their input/output.

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Lecture 9: Digital Electronics

EE 209 Spiral 1 Exam Solutions Name:

Problem Set 9 Solutions

ELE2120 Digital Circuits and Systems. Tutorial Note 9

COMBINATIONAL LOGIC FUNCTIONS

NAND, NOR and XOR functions properties

Analysis of clocked sequential networks

Lecture 10: Synchronous Sequential Circuits Design

CPE/EE 422/522. Chapter 1 - Review of Logic Design Fundamentals. Dr. Rhonda Kay Gaede UAH. 1.1 Combinational Logic

Chapter 5 Synchronous Sequential Logic

04. What is the Mod number of the counter circuit shown below? Assume initially reset.

Finite State Machine. By : Ali Mustafa

Finite State Machine (1A) Young Won Lim 6/9/18

CPE100: Digital Logic Design I

Lecture 8: Sequential Networks and Finite State Machines

ELCT201: DIGITAL LOGIC DESIGN

Digital Electronics. Delay Max. FF Rate Power/Gate High Low (ns) (MHz) (mw) (V) (V) Standard TTL (7400)

CE1911 LECTURE FSM DESIGN PRACTICE DAY 1

Synchronous Sequential Circuit Design. Digital Computer Design

Latches. October 13, 2003 Latches 1

Lecture 17: Designing Sequential Systems Using Flip Flops

Total time is: 1 setup, 2 AND, 3 XOR, 1 delay = (1*1) + (2*2) + (3*3) + (1*1) = 15ns

Chapter 4 Part 2 Sequential Circuits

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

Chapter 7 Logic Circuits

Chapter #6: Sequential Logic Design

CS61C : Machine Structures

Combinational Logic. By : Ali Mustafa

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Chapter 6. Synchronous Sequential Circuits

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

Computer organization

CS61C : Machine Structures

COMPUTER SCIENCE TRIPOS

Faculty of Engineering. FINAL EXAMINATION FALL 2008 (December2008) ANSWER KEY

COE 328 Final Exam 2008

CHAPTER 7. Exercises 17/ / /2 2 0

Digital Logic Design. Midterm #2

or 0101 Machine

Sample Test Paper - I

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

CMPE12 - Notes chapter 2. Digital Logic. (Textbook Chapters and 2.1)"

Lecture 3 Review on Digital Logic (Part 2)

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Transcription:

Mealy & Moore Machines Moore Machine is a finite-state machine whose output values are determined solely by its current state and can be defined as six elements (S, S 0, Σ, Λ, T, G), consisting of the following: a finite set of states ( S ) a start state (also called initial state) S 0 which is an element of (S) a finite set called the input alphabet ( Σ ) a finite set called the output alphabet ( Λ ) a transition function (T : S Σ S) mapping a state and the input alphabet to the next state an output function (G : S Λ) mapping each state to the output alphabet. Mealy Machine output values are determined both by its current state and by the values of its inputs and can be defined as six elements (S, S 0, Σ, Λ, T, G), consisting of the following: a finite set of states ( S ) a start state (also called initial state) S 0 which is an element of (S) a finite set called the input alphabet ( Σ ) a finite set called the output alphabet ( Λ ) a transition function (T : S Σ S) mapping a state and the input alphabet to the next state an output function (G : S Σ Λ) mapping pairs of a state and an input symbol to the corresponding output symbol. http://en.wikipedia.org/wiki/theory_of_computation

RS Flip Flop Truth Tables In order to eliminate ambiguity and to achieve some sense of continuity, we will follow the convention: Set implies Q = 1. Reset implies Q = 0. Set Reset Set Reset Set Reset NOR Gates NAND Gates NAND Gates with Inverted S & R inputs S R Q S R Q S R S R Q 0 0 Q Hold 0 0 X 0 0 1 1 Q Hold 0 1 0 Reset 0 1 1 Set 0 1 1 0 0 Reset 1 0 1 Set 1 0 0 Reset 1 0 0 1 1 Set 1 1 X 1 1 Q Hold 1 1 0 0 X X = Not Allowed X = Not Allowed X = Not Allowed S=1 => Set (Q=1) S=0 => Set (Q=1) S=1 => S=0 => Set (Q=1) R=1 => Reset (Q=0) R=0 => Reset (Q=0) R=1 => R=0 => Reset (Q=0) As you can see, there is consistency for Set means Q=1 and Reset means Q=0; but there can be confusion trying to decide whether-or-not S & R are 0 or 1 depending on the type of gates (NOR or NAND). If inverted S & R inputs are used with the NAND gates, then S=1 is the Set input and R=1 is the Reset input; which is the same as the NOR gates implementation.

NAND Gate Equivalent Circuits Two-input (X & Y) with one-output (F) logic gate circuits can be defined by a total of 16 functions. X Y F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 0 0 0 1 0 0 0 1 1 1 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 1 1 1 1 Six of the functions can be represented merely as hard-wired configurations (inverters as required): F1, F16, F11, F10, F6, F7. X Y F1 F16 F11 F10 F6 F7 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 X Y X Y Eight other functions can be implemented using only one NAND gate (inverters as required): F2, F3, F4, F5, F15, F14, F13, F12 X Y F2 F3 F4 F5 F15 F14 F13 F12 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 1 1 1 0 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 1 1 0 X Y X Y X Y X Y NOT (X Y) NOT (X Y) NOT (X Y) NOT (X Y) The remaining two functions can be implemented using three NAND gates (inverters as required): F8, F9. X Y F8 F9 0 0 1 0 0 1 0 1 1 0 0 1 1 1 1 0 X Y + X Y X Y + X Y Notes: A OR B = NAND (A B) F6 = NOT F11 = X F7 = NOT F10 = Y F15 = NOT F2 = NAND (X Y) F14 = NOT F3 = NAND (X Y) F13 = NOT F4 = NAND (X Y) F12 = NOT F5 = NAND (X Y) F8 = X Y + X Y = NAND [ NAND (X Y) with NAND (X Y) ] F9 = X Y + X Y = NAND [ NAND (X Y) with NAND (X Y) ] F8 = NOT F9

NAND Gate Equivalent Circuits Sketch an equivalent circuit using only NAND gates to represent each of 16 different possible output functions from a combination of 2 inputs (X & Y). Note: Indicate inversion with either input bubbles or output bubbles; do not use additional inverter gates. X Y F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 0 0 0 1 0 0 0 1 1 1 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 1 1 1 1 Example: See Function F8 above, use positive logic when the Output Function = 1 X = 0, Y = 0 X AND Y or X = 1, Y = 1 X AND Y F8 = (X AND Y) OR (X AND Y) F8 = (X AND Y) OR (X AND Y) F8 = (X AND Y) AND (X AND Y) = NAND( X with Y ) AND NAND (X with Y) F8 = NAND (NAND( X with Y ) with NAND( X with Y ) Sketch: X Y #1 #3 #2 Logic Table Proof: X Y X Y Gate #1 Gate #2 Gate #3 X NAND Y X NAND Y Gate#1 NAND Gate #2 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 0 0 1 0 1 See page 2 for a similar case using negative logic when the Output Function F8 = 0. Page 1.

Negative logic when the Output Function F8 = 0 X = 0, Y = 1 X AND Y or X = 1, Y = 1 X AND Y Note F8 = 0, is the same as F8 so F8 = (X AND Y) OR (X AND Y) F8 = (X AND Y) OR (X AND Y) F8 = (X AND Y) AND (X AND Y) F8 = NAND( X with Y) AND NAND( X with Y) F8 = NOT NAND [(NAND( X with Y) with NAND( X with Y)] Sketch: X Y #1 #3 #2 Logic Table Proof: X Y X Y Gate #1 Gate #2 Gate #3 X NAND Y X NAND Y Gate#1 NAND Gate #2 NOT (Gate#3) 0 0 1 1 1 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 0 1 Page 2.

NAND Gate Equivalent Circuits Sketch an equivalent circuit using only NAND gates to represent each of 16 different possible output functions from a combination of 2 inputs (X & Y). Note: Indicate inversion with either input bubbles or output bubbles; do not use additional inverter gates. X Y F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16 0 0 0 1 0 0 0 1 1 1 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 1 1 1 1 Example: See Function F9 above, use positive logic when the Output Function = 1 X = 0, Y = 1 X AND Y or X = 1, Y = 0 X AND Y F9 = (X AND Y) OR (X AND Y) F9 = (X AND Y) OR (X AND Y) F9 = (X AND Y) AND (X AND Y) = NAND( X with Y) AND NAND (X with Y) F9 = NAND (NAND( X with Y) with NAND( X with Y ) Sketch: X Y #1 #3 #2 Logic Table Proof: X Y X Y Gate #1 Gate #2 Gate #3 X NAND Y X NAND Y Gate#1 NAND Gate #2 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 1 0 See page 4 for a similar case using negative logic when the Output Function F9 = 0. Page 3.

Negative logic when the Output Function F9 = 0 X = 0, Y = 0 X AND Y or X = 1, Y = 1 X AND Y Note F9 = 0, is the same as F9 so F9 = (X AND Y) OR (X AND Y) F9 = (X AND Y) OR (X AND Y) F9 = (X AND Y) AND (X AND Y) F9 = NAND( X with Y) AND NAND( X with Y) F9 = NOT NAND [(NAND( X withy) with NAND( X with Y)] Sketch: X Y #1 #3 #2 Logic Table Proof: X Y X Y Gate #1 Gate #2 Gate #3 X NAND Y X NAND Y Gate#1 NAND Gate #2 NOT (Gate#3) 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 0 1 0 Page 4.