State and Finite State Machines

Size: px
Start display at page:

Download "State and Finite State Machines"

Transcription

1 State and Finite State Machines See P&H Appendix C.7. C.8, C.10, C.11 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University

2 Big Picture: Building a Processor memory inst register file alu PC new pc offset target imm control extend =? cmp addr d in d out memory A Single cycle processor

3 Review: Efficiency and Generality We can generalize 1 bit Full Adders to 32 bits, 64 bits A 3 B 3 A 2 B 2 A 1 B 1 A 0 B 0 C 0 S 3 S 2 S 1 S 0

4 Review: Efficiency and Generality We can generalize 1 bit Full Adders to 32 bits, 64 bits How long does it take to compute a result? Can we store the result? B 3 B 2 B 1 B 0 over flow A 3 mux mux mux A 2 A 1 A mux 0 0=add 1=sub S 3 S 2 S 1 S 0

5 Performance Speed of a circuit is affected by the number of gates in series (on the critical path or the deepest level of logic) inputs arrive Combinational Logic outputs expected t combinational

6 4 bit Ripple Carry Adder A 3 B 3 A 2 B 2 A 1 B 1 A 0 B 0 C 4 C 3 C 2 C 1 C 0 S 3 S 2 S 1 Carry ripples from lsb to msb S 0 First full adder, 2 gate delay Second full adder, 2 gate delay

7 Stateful Components Until now is combinatorial logic Output is computed when inputs are present System has no internal state Nothing computed in the present can depend on what happened in the past! Inputs N Combinational circuit M Outputs Need a way to record data Need a way to build stateful circuits Need a state holding device Finite State Machines

8 Goals for Today State How do we store one bit? Attempts at storing (and changing) one bit Set Reset Latch D Latch D Flip Flops Master Slave Flip Flops Register: storing more than one bit, N bits Basic Building Blocks Decoders and Encoders Finite State Machines (FSM) How do we design logic circuits with state? Types of FSMs: Mealy and Moore Machines Examples: Serial Adder and a Digital Door Lock

9 Goal How do we store store one bit?

10 First Attempt: Unstable Devices B C A

11 First Attempt: Unstable Devices 10 B 01 A Does not work! Unstable Oscillates wildly! 01 C

12 Second Attempt: Bistable Devices Stable and unstable equilibria? A B A Simple Device A In stable state, A = B B A How do we change the state? B

13 Third Attempt: Set Reset Latch AS Q Q BR

14 Third Attempt: Set Reset Latch S Q R S R Q Q Set Reset (S R) Latch Stores a value Q and its complement

15 Third Attempt: Set Reset Latch 0 Q will be 0 if R is 1 S R Q Q ? 1? S 0 Q 1 1 R will be 1 Set Reset (S R) Latch Stores a value Q and its complement A B OR NOR

16 Third Attempt: Set Reset Latch 1 Q will be 1 S R Q Q ? 0? 1 1 S 1 Q 0 0 R will be 0 if S is 1 Set Reset (S R) Latch Stores a value Q and its complement A B OR NOR What are the values for Q and? a) 0 and 0 b) 0 and 1 c) 1 and 0 d) 1 and 1

17 Third Attempt: Set Reset Latch S R Q Q 0 0 Q? Q? If Q is 1, will stay 1 if Q is 0, will stay 0 S 1 0 Q 0 0 R If is 0will stay 0 If is 1 will stay 1 Set Reset (S R) Latch Stores a value Q and its complement A B OR NOR

18 Third Attempt: Set Reset Latch S R Q Q 0 0 Q Q ?? 0 S Q will be 0since R is 1 Q R will be 0 since S is 1 Set Reset (S R) Latch Stores a value Q and its complement A B OR NOR What happens when S,R changes from 1,1 to 0,0?

19 Third Attempt: Set Reset Latch S R Q Q 0 0 Q Q forbidden?? S Q R 1 0 Set Reset (S R) Latch Stores a value Q and its complement A B OR NOR What happens when S,R changes from 1,1 to 0,0? Q and Q become unstable and will oscillate wildly between values 0,0 to 1,1 to 0,0 to 1,1

20 Third Attempt: Set Reset Latch S S R Q Q S R Q Q 0 0 Q Q hold reset set R Set Reset (S R) Latch Stores a value Q and its complement 1 1 forbidden

21 Takeaway Set Reset (SR) Latch can store one bit and we can change the value of the stored bit. But, SR Latch has a forbidden state.

22 Next Goal How do we avoid the forbidden state of S R Latch?

23 Fourth Attempt: (Unclocked) D Latch D S D S R Q Q Q R D Q Fill in the truth table? 0 1 A B OR NOR

24 Fourth Attempt: (Unclocked) D Latch D S D S R Q Q Q Fill in the truth table? Data (D) Latch Easier to use than an SR latch No possibility of entering an undefined state When D changes, Q changes immediately ( after a delay of 2 Ors and 2 NOTs) Need to control when the output changes R D Q A B OR NOR

25 Takeaway Set Reset (SR) Latch can store one bit and we can change the value of the stored bit. But, SR Latch has a forbidden state. (Unclocked) D Latch can store and change a bit like an SR Latch while avoiding the forbidden state.

26 Next Goal How do we coordinate state changes to a D Latch?

27 Clocks Clock helps coordinate state changes Usually generated by an oscillating crystal Fixed period; frequency = 1/period 1 0 clock high clock period falling edge clock low rising edge

28 Clock Disciplines Level sensitive State changes when clock is high (or low) Edge triggered State changes at clock edge positive edge triggered negative edge triggered

29 Clock Methodology Clock Methodology Negative edge, synchronous clk t combinational t setup t hold compute save compute save compute Edge Triggered: Signals must be stable near falling clock edge Positive edge synchronous

30 Fifth Attempt: D Latch with Clock D S R Q

31 Fifth Attempt: D Latch with Clock D S Q clk R Fill in the truth table clk D Q

32 Fifth Attempt: D Latch with Clock D S Q clk R Fill in the truth table S R Q 0 0 Q hold reset set 1 1 forbidden clk D Q 0 0 Q 0 1 Q

33 D clk clk D Q Fifth Attempt: D Latch with Clock S R Q Level Sensitive D Latch Clock high: set/reset (according to D) Clock low: keep state (ignore D) clk D Q 0 0 Q 0 1 Q

34 Sixth Attempt: Edge Triggered D Flip Flop clk D X Q 1 D clk 0 0 D Q X D Q 1 L cl c 0 Q D Flip Flop Edge Triggered Data captured when clock is high Output changes only on falling edges Activity#1: Fill in timing graph and values for X and Q

35 Sixth Attempt: Edge Triggered D Flip Flop clk D X Q 01 D clk D Q X D Q 01 L cl c 10 Q D Flip Flop Edge Triggered Data captured when clock is high Output changes only on falling edges

36 Takeaway Set Reset (SR) Latch can store one bit and we can change the value of the stored bit. But, SR Latch has a forbidden state. (Unclocked) D Latch can store and change a bit like an SR Latch while avoiding a forbidden state. An Edge Triggered D Flip Flip (aka Master Slave D Flip Flip) stores one bit. The bit can be changed in a synchronized fashion on the edge of a clock signal.

37 Next Goal How do we store more than one bit, N bits?

38 Registers D0 D1 D2 Register D flip flops in parallel shared clock extra clocked inputs: write_enable, reset, D3 clk 4 bit 4 reg 4 clk

39 Takeaway Set Reset (SR) Latch can store one bit and we can change the value of the stored bit. But, SR Latch has a forbidden state. (Unclocked) D Latch can store and change a bit like an SR Latch while avoiding a forbidden state. An Edge Triggered D Flip Flip (aka Master Slave D Flip Flip) stores one bit. The bit can be changed in a synchronized fashion on the edge of a clock signal. An N bit register stores N bits. It is be created with N D Flip Flops in parallel along with a shared clock.

40 An Example: What will this circuit do? 4 Decoder bit reg +1 Clk 4

41 An Example: What will this circuit do? Reset Run WE R 4 Decoder bit reg Clk A[4] 1 = 0001 =B[4] C out +1 S[4] 4

42 Decoder Example: 7 Segment LED 7 Segment LED photons emitted when electrons fall into holes d7 d6 d5 d4 d3 d2 d1 d0

43 Decoder Example: 7 Segment LED 7 Segment LED photons emitted when electrons fall into holes d7 d6 d5 d4 d3 d2 d1 d0

44 Decoder Example: 7 Segment LED Decoder 7LED decode 3 inputs encode 0 7 in binary 7 outputs one for each LED

45 7 Segment LED Decoder Implementation b2 b1 b0 d6 d5 d4 d3 d2 d1 d d1 d2 d0 d3 d4 d6 d5

46 7 Segment LED Decoder Implementation b2 b1 b0 d6 d5 d4 d3 d2 d1 d d1 d2 d0 d3 d4 d6 d5

47 Basic Building Blocks We have Seen 2 N binary encoder N N binary decoder 2 N N N N... N Multiplexor 2 M 1 N M

48 Encoders N Input wires N encoder... Log 2 (N) outputs wires e.g. Voting: Can only vote for one out of N candidates, so N inputs. But can encode vote efficiently with binary encoding.

49 Example Encoder Truth Table a 1 a b c d b 2 o o c 3 o 2 d 4 A 3-bit encoder with 4 inputs for simplicity

50 Example Encoder Truth Table a 1 a b c d o2 o1 o b 2 o o c 3 o 2 d 4 o2 = abcd A 3-bit encoder with 4 inputs for simplicity o1 = abcd + abcd o0 = abcd + abcd

51 Basic Building Blocks Example: Voting detect enc 7LED decode Ballots The 3410 optical scan vote reader machine

52 Recap We can now build interesting devices with sensors Using combinatorial logic We can also store data values (aka Sequential Logic) In state holding elements Coupled with clocks

53 Administrivia Make sure to go to your Lab Section this week Design Doc for Lab1 due Monday, Feb 4th Completed Lab1 due in two weeks, Monday, Feb 11th Work alone Homework1 is out Due in one week, next Wednesday, start early Homework Help Session: Thursday and Monday, B14 HLN, 6 8pm Work alone BUT, use your resources Lab Section, Piazza.com, Office Hours, Homework Help Session, Class notes, book, Sections, CSUGLab

54 Administrivia Check online syllabus/schedule Slides and Reading for lectures Office Hours Homework and Programming Assignments Prelims (in evenings): Tuesday, February 26 th Thursday, March 28 th Thursday, April 25 th Schedule is subject to change

55 Collaboration, Late, Re grading Policies Black Board Collaboration Policy Can discuss approach together on a black board Leave and write up solution independently Do not copy solutions Late Policy Each person has a total of four slip days Max of two slip days for any individual assignment Slip days deducted first for any late assignment, cannot selectively apply slip days For projects, slip days are deducted from all partners 25% deducted per day late after slip days are exhausted Regrade policy Submit written request to lead TA, and lead TA will pick a different grader Submit another written request, lead TA will regrade directly Submit yet another written request for professor to regrade.

56 Goals for Today State How do we store one bit? Attempts at storing (and changing) one bit Set Reset Latch D Latch D Flip Flops Master Slave Flip Flops Register: storing more than one bit, N bits Basic Building Blocks Decoders and Encoders Finite State Machines (FSM) How do we design logic circuits with state? Types of FSMs: Mealy and Moore Machines Examples: Serial Adder and a Digital Door Lock

57 Finite State Machines

58 Next Goal How do we design logic circuits with state?

59 Finite State Machines An electronic machine which has external inputs externally visible outputs internal state Output and next state depend on inputs current state

60 Abstract Model of FSM Machine is M = ( S, I, O, ) S: Finite set of states I: Finite set of inputs O: Finite set of outputs : State transition function Next state depends on present input and present state

61 Automata Model Finite State Machine Registers Current State Input Comb. Logic Output Next State inputs from external world outputs to external world internal state combinational logic

62 FSM Example input/output state Legend start state up/off up/off Input: up or down Output: on or off States: A, B, C, or D A C down/on up/off up/off B down/off D down/on up/off

63 FSM Example input/output state Legend start state up/off up/off A Input: = up or = down Output: = on or = off States: = A, = B, = C, or = D C down/on up/off up/off B down/off D down/on up/off

64 i 0 i 1 i 2 /o 0 o 1 o 2 S 1 S 0 FSM Example 1/1 0/0 1/1 S 1 S Legend 0/0 0/0 Input: 0=up or 1=down Output: 1=on or 1=off States: 00=A, 01=B, 10=C, or 11=D /0 0/0 1/0

65 Mealy Machine General Case: Mealy Machine Registers Current State Input Comb. Logic Output Next State Outputs and next state depend on both current state and input

66 Moore Machine Special Case: Moore Machine Registers Current State Input Comb. Logic Comb. Logic Output Next State Outputs depend only on current state

67 Moore Machine FSM Example input state out start out up A off down B on down Legend Input: up or down Output: on or off States: A, B, C, or D up C off up up down D off up

68 Mealy Machine FSM Example input/output state Legend start state up/off up/off Input: up or down Output: on or off States: A, B, C, or D A C down/on up/off up/off B down/off D down/on up/off

69 Activity#2: Create a Logic Circuit for a Serial Adder Add two infinite input bit streams streams are sent with least significant bit (lsb) first How many states are needed to represent FSM? Draw and Fill in FSM diagram Strategy: (1) Draw a state diagram (e.g. Mealy Machine) (2) Write output and next state tables (3) Encode states, inputs, and outputs as bits (4) Determine logic equations for next state and outputs

70 FSM: State Diagram a b z Two states: S0 (no carry in), S1 (carry in) Inputs: aand b Output: z z is the sum of inputs a, b, and carry in (one bit at a time) A carry out is the next carry in state..

71 FSM: State Diagram / /_ S0 /_ S1 / / / / /_ a b z Two states: S0 (no carry in), S1 (carry in) Inputs: aand b Output: z z is the sum of inputs a, b, and carry in (one bit at a time) A carry out is the next carry in state. Arcs labeled with input bits a and b, and output z

72 FSM: State Diagram 11/0 00/0 S0 00/1 S1 11/1 10/1 01/1 10/0 01/0 a b z Two states: S0 (no carry in), S1 (carry in) Inputs: aand b Output: z z is the sum of inputs a, b, and carry in (one bit at a time) A carry out is the next carry in state. Arcs labeled with input bits a and b, and output z (Mealy Machine)

73 Serial Adder: State Table 11/0 00/0 S0 00/1 S1 11/1 10/1 01/1 10/0 01/0 a b Current state z Next state (2) Write down all input and state combinations

74 Serial Adder: State Table 11/0 00/0 S0 00/1 S1 11/1 10/1 01/1 10/0 01/0 a b Current state z Next state 0 0 S0 0 S0 0 1 S0 1 S0 1 0 S0 1 S0 1 1 S0 0 S1 0 0 S1 1 S0 0 1 S1 0 S1 1 0 S1 0 S1 1 1 S1 1 S1 (2) Write down all input and state combinations

75 Serial Adder: State Assignment 11/0 00/0 0 00/1 1 11/1 10/1 01/1 10/0 01/0 a b s z s' (3) Encode states, inputs, and outputs as bits Two states, so 1 bit is sufficient A single flip flop will encode the state

76 Next State s' Serial Adder: Circuit Current Output State D Q s Comb. z a Logic b Next State Input s' a b s z s' (4) Determine logic equations for next state and outputs Combinational Logic Equations z= b + a + s + abs s = ab + bs + a s + abs

77 Next State s' Sequential Logic Circuits Current Output State D Q s Comb. z a Logic b Next State Input s' z= b + a + s + abs s = ab + bs + a s + abs Strategy:. (1) Draw a state diagram (e.g.. Mealy Machine) (2) Write output and next state. tables (3) Encode states, inputs, and outputs as bits (4) Determine logic equations for next state and outputs

78 Example #2: Digital Door Lock Digital Door Lock Inputs: keycodes from keypad clock Outputs: unlock signal display how many keys pressed so far

79 Door Lock: Inputs Assumptions: signals are synchronized to clock Password is B A B K A B K A B Meaning Ø (no key) A pressed B pressed

80 D 3 D 2 D 1 D 0 4 LED dec 8 U Door Lock: Outputs Assumptions: High pulse on U unlocks door Strategy: (1) Draw a state diagram (e.g. Moore Machine) (2) Write output and next state tables (3) Encode states, inputs, and outputs as bits (4) Determine logic equations for next state and outputs

81 Door Lock: Simplified State Diagram B Ø Ø G1 A G2 B G , U else else any Ø Idle 0 else B1 else B2 1 2 Ø Ø else any B3 3 (1) Draw a state diagram (e.g. Moore Machine)

82 Door Lock: Simplified State Diagram B Ø Ø G1 A G2 B G , U else else any Idle 0 Ø else else B1 else B2 1 2 Ø Ø (1) Draw a state diagram (e.g. Moore Machine)

83 Ø Door Lock: Simplified State Diagram Idle 0 B else Ø Ø G1 A G2 B G , U else B1 else B2 1 2 Ø else else (2) Write output and next state tables Ø Cur. State any Output

84 Ø Door Lock: Simplified State Diagram Idle 0 B else Ø Ø G1 A G2 B G , U else else B1 else B2 1 2 else Ø Ø (2) Write output and next state tables Cur. any Output State Idle 0 G1 1 G2 2 G3 3, U B1 1 B2 2

85 Door Lock: Simplified State Diagram B Ø Ø G1 A G2 B G , U else Cur. State Input Next State else any Idle 0 Ø else else B1 else B2 1 2 Ø Ø (2) Write output and next state tables

86 Ø Door Lock: Simplified State Diagram Idle 0 B else Ø Ø G1 A G2 B G , U else else B1 else B2 1 2 Cur. State Input Next State else Idle Ø Idle Idle B G1 Idle A B1 G1 Ø G1 any G1 A G2 G1 B B2 G2 Ø B2 G2 B G3 G2 A Idle G3 any Idle B1 Ø B1 B1 K B2 B2 Ø B2 Ø Ø B2 K Idle (2) Write output and next state tables

87 State K A B Meaning S 2 S 1 S 0 0 Idle 0 0 Ø 0 (no 0 key) 0 U 1 G1 1 0 A 0 pressed G2 0 1 B 0 pressed 1 0 G D 3 D 2 D 1 D 0 4 dec 8 State Table Encoding SCur. 2 SState 1 S 0 D 3 DOutput 2 D 1 D 0 U Cur. S 2 SState 1 S 0 K Input A B S Next 2 S State 1 S 0 0 Idle Idle Ø0 0 0 Idle G Idle B G G Idle A B G , 1 U1 1 0 G Ø0 0 0 G B G A G B G B B2 0 1 K A B B (3) Encode states, inputs, and outputs as bits B G Ø0 0 0 B G B G G A Idle G3 1 1 x any x x 0 Idle B Ø0 0 1 B B Kx x 1 B B Ø0 0 1 B B Kx x 0 Idle 0 0

88 Door Lock: Implementation 3bit Reg S 2 0 D 3 0 U 4 dec clk S 2 0 U = 2S 1 S 0 D 0 = 2 1S 0 + 2S 1 S 0 + S D 1 = 2S 1 S 0 + 2S 1 S 0 + 2S 1 S 0 S 2 S 1 S 0 D 3 D 2 D 1 D 0 U KA B S (4) Determine logic equations for next state and outputs

89 Door Lock: Implementation 3bit Reg clk S 2 0 S 2 0 K A B S 2 S 1 S 4 0 K A B S 2 S 1 S 0 D U S x x x x x x x S 2 = S 2 S 1 S 0 KAB + S 2 S 1 S 0 KA B + S 2 S 1 S 2 KAB + S 2 S 1 S 0 K + S 2 S 1 S 0 KAB dec

90 Door Lock: Implementation 3bit Reg S 2 0 D 3 0 U 4 dec clk S 2 0 K A B S 2 0 Strategy: (1) Draw a state diagram (e.g. Moore Machine) (2) Write output and next state tables (3) Encode states, inputs, and outputs as bits (4) Determine logic equations for next state and outputs

91 Summary We can now build interesting devices with sensors Using combinational logic We can also store data values Stateful circuit elements (D Flip Flops, Registers, ) Clock to synchronize state changes State Machines or Ad Hoc Circuits

State & Finite State Machines

State & Finite State Machines State & Finite State Machines Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H Appendix C.7. C.8, C.10, C.11 Big Picture: Building a Processor memory inst register file

More information

State & Finite State Machines

State & Finite State Machines State & Finite State Machines Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H Appendix C.7. C.8, C.10, C.11 Stateful Components Until now is combinatorial logic Output

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

More information

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C. Numbers & Arithmetic Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See: P&H Chapter 2.4-2.6, 3.2, C.5 C.6 Example: Big Picture Computer System Organization and Programming

More information

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

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs Appendix B Review of Digital Logic Baback Izadi Division of Engineering Programs bai@engr.newpaltz.edu Elect. & Comp. Eng. 2 DeMorgan Symbols NAND (A.B) = A +B NOR (A+B) = A.B AND A.B = A.B = (A +B ) OR

More information

CPE100: Digital Logic Design I

CPE100: Digital Logic Design I Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu CPE100: Digital Logic Design I Midterm02 Review http://www.ee.unlv.edu/~b1morris/cpe100/ 2 Logistics Thursday Nov. 16 th In normal lecture (13:00-14:15)

More information

CPE100: Digital Logic Design I

CPE100: Digital Logic Design I Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu CPE100: Digital Logic Design I Final Review http://www.ee.unlv.edu/~b1morris/cpe100/ 2 Logistics Tuesday Dec 12 th 13:00-15:00 (1-3pm) 2 hour

More information

Topic 8: Sequential Circuits

Topic 8: Sequential Circuits Topic 8: Sequential Circuits Readings : Patterson & Hennesy, Appendix B.4 - B.6 Goals Basic Principles behind Memory Elements Clocks Applications of sequential circuits Introduction to the concept of the

More information

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN ELCT201: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Lecture 6 Following the slides of Dr. Ahmed H. Madian محرم 1439 ه Winter

More information

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) ELEC 2200-002 Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and Computer Engineering

More information

ALU, Latches and Flip-Flops

ALU, Latches and Flip-Flops CSE14: Components and Design Techniques for Digital Systems ALU, Latches and Flip-Flops Tajana Simunic Rosing Where we are. Last time: ALUs Plan for today: ALU example, latches and flip flops Exam #1 grades

More information

ALU A functional unit

ALU A functional unit ALU A functional unit that performs arithmetic operations such as ADD, SUB, MPY logical operations such as AND, OR, XOR, NOT on given data types: 8-,16-,32-, or 64-bit values A n-1 A n-2... A 1 A 0 B n-1

More information

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process Parity Checker Example A string of bits has even parity if the number of 1 s in the string is even. Design a circuit that accepts a bit-serial stream of bits and outputs a 0 if the parity thus far is even

More information

6. Finite State Machines

6. Finite State Machines 6. Finite State Machines 6.4x Computation Structures Part Digital Circuits Copyright 25 MIT EECS 6.4 Computation Structures L6: Finite State Machines, Slide # Our New Machine Clock State Registers k Current

More information

Synchronous Sequential Circuit Design. Digital Computer Design

Synchronous Sequential Circuit Design. Digital Computer Design Synchronous Sequential Circuit Design Digital Computer Design Races and Instability Combinational logic has no cyclic paths and no races If inputs are applied to combinational logic, the outputs will always

More information

Lecture 7: Logic design. Combinational logic circuits

Lecture 7: Logic design. Combinational logic circuits /24/28 Lecture 7: Logic design Binary digital circuits: Two voltage levels: and (ground and supply voltage) Built from transistors used as on/off switches Analog circuits not very suitable for generic

More information

Lecture 10: Synchronous Sequential Circuits Design

Lecture 10: Synchronous Sequential Circuits Design Lecture 0: Synchronous Sequential Circuits Design. General Form Input Combinational Flip-flops Combinational Output Circuit Circuit Clock.. Moore type has outputs dependent only on the state, e.g. ripple

More information

Lecture 3 Review on Digital Logic (Part 2)

Lecture 3 Review on Digital Logic (Part 2) Lecture 3 Review on Digital Logic (Part 2) Xuan Silvia Zhang Washington University in St. Louis http://classes.engineering.wustl.edu/ese461/ ircuit Optimization Simplest implementation ost criterion literal

More information

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

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering SEQUENTIAL CIRCUITS: LATCHES Overview Circuits require memory to store intermediate

More information

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

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value EGC22 Digital Logic Fundamental Additional Practice Problems. Complete the following table of equivalent values. Binary. Octal 35.77 33.23.875 29.99 27 9 64 Hexadecimal B.3 D.FD B.4C 2. Calculate the following

More information

EECS150 - Digital Design Lecture 23 - FSMs & Counters

EECS150 - Digital Design Lecture 23 - FSMs & Counters EECS150 - Digital Design Lecture 23 - FSMs & Counters April 8, 2010 John Wawrzynek Spring 2010 EECS150 - Lec22-counters Page 1 One-hot encoding of states. One FF per state. State Encoding Why one-hot encoding?

More information

Last lecture Counter design Finite state machine started vending machine example. Today Continue on the vending machine example Moore/Mealy machines

Last lecture Counter design Finite state machine started vending machine example. Today Continue on the vending machine example Moore/Mealy machines Lecture 2 Logistics HW6 due Wednesday Lab 7 this week (Tuesday exception) Midterm 2 Friday (covers material up to simple FSM (today)) Review on Thursday Yoky office hour on Friday moved to Thursday 2-:2pm

More information

Latches. October 13, 2003 Latches 1

Latches. October 13, 2003 Latches 1 Latches The second part of CS231 focuses on sequential circuits, where we add memory to the hardware that we ve already seen. Our schedule will be very similar to before: We first show how primitive memory

More information

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

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017 UNIVERSITY OF BOLTON TW35 SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER 2-2016/2017 INTERMEDIATE DIGITAL ELECTRONICS AND COMMUNICATIONS MODULE NO: EEE5002

More information

Different encodings generate different circuits

Different encodings generate different circuits FSM State Encoding Different encodings generate different circuits no easy way to find best encoding with fewest logic gates or shortest propagation delay. Binary encoding: K states need log 2 K bits i.e.,

More information

Synchronous Sequential Logic

Synchronous Sequential Logic 1 IT 201 DIGITAL SYSTEMS DESIGN MODULE4 NOTES Synchronous Sequential Logic Sequential Circuits - A sequential circuit consists of a combinational circuit and a feedback through the storage elements in

More information

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

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop EE210: Switching Systems Lecture 14: State Tables, Diagrams, Latches, and Flip Flop Prof. YingLi Tian Nov. 6, 2017 Department of Electrical Engineering The City College of New York The City University

More information

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

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid CSE140: Components and Design Techniques for Digital Systems Midterm Information Instructor: Mohsen Imani Midterm Topics In general: everything that was covered in homework 1 and 2 and related lectures,

More information

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

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department Page 1 of 13 COE 202: Digital Logic Design (3-0-3) Term 112 (Spring 2012) Final

More information

Finite State Machine (FSM)

Finite State Machine (FSM) Finite State Machine (FSM) Consists of: State register Stores current state Loads next state at clock edge Combinational logic Computes the next state Computes the outputs S S Next State CLK Current State

More information

Timing Constraints in Sequential Designs. 63 Sources: TSR, Katz, Boriello & Vahid

Timing Constraints in Sequential Designs. 63 Sources: TSR, Katz, Boriello & Vahid Timing Constraints in Sequential esigns 63 Sources: TSR, Katz, Boriello & Vahid Where we are now. What we covered last time: FSMs What we ll do next: Timing constraints Upcoming deadlines: ZyBook today:

More information

Digital Circuits ECS 371

Digital Circuits ECS 371 Digital Circuits ECS 371 Dr. Prapun Suksompong prapun@siit.tu.ac.th Lecture 18 Office Hours: BKD 3601-7 Monday 9:00-10:30, 1:30-3:30 Tuesday 10:30-11:30 1 Announcement Reading Assignment: Chapter 7: 7-1,

More information

Sequential Logic. Handouts: Lecture Slides Spring /27/01. L06 Sequential Logic 1

Sequential Logic. Handouts: Lecture Slides Spring /27/01. L06 Sequential Logic 1 Sequential Logic Handouts: Lecture Slides 6.4 - Spring 2 2/27/ L6 Sequential Logic Roadmap so far Fets & voltages Logic gates Combinational logic circuits Sequential Logic Voltage-based encoding V OL,

More information

CS61C : Machine Structures

CS61C : Machine Structures CS 61C L15 Blocks (1) inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #15: Combinational Logic Blocks Outline CL Blocks Latches & Flip Flops A Closer Look 2005-07-14 Andy Carle CS

More information

Adders allow computers to add numbers 2-bit ripple-carry adder

Adders allow computers to add numbers 2-bit ripple-carry adder Lecture 12 Logistics HW was due yesterday HW5 was out yesterday (due next Wednesday) Feedback: thank you! Things to work on: ig picture, ook chapters, Exam comments Last lecture dders Today Clarification

More information

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS:

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS: EKURHULENI TECH COLLEGE. No. 3 Mogale Square, Krugersdorp. Website: www. ekurhulenitech.co.za Email: info@ekurhulenitech.co.za TEL: 011 040 7343 CELL: 073 770 3028/060 715 4529 PAST EXAM PAPER & MEMO N3

More information

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

Topic 8: Sequential Circuits. Bistable Devices. S-R Latches. Consider the following element. Readings : Patterson & Hennesy, Appendix B.4 - B. Topic 8: Sequential Circuits Bistable Devices Readings : Consider the following element Patterson & Hennesy, Appendix B.4 - B.6 Goals Basic Principles behind Memory Elements Clocks Applications of sequential

More information

Floating Point Representation and Digital Logic. Lecture 11 CS301

Floating Point Representation and Digital Logic. Lecture 11 CS301 Floating Point Representation and Digital Logic Lecture 11 CS301 Administrative Daily Review of today s lecture w Due tomorrow (10/4) at 8am Lab #3 due Friday (9/7) 1:29pm HW #5 assigned w Due Monday 10/8

More information

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

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007 EECS 150 - Components and Design Techniques for Digital Systems FSMs 9/11/2007 Sarah Bird Electrical Engineering and Computer Sciences University of California, Berkeley Slides borrowed from David Culler

More information

CS61C : Machine Structures

CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #15: Combinational Logic Blocks 2005-07-14 CS 61C L15 Blocks (1) Andy Carle Outline CL Blocks Latches & Flip Flops A Closer Look CS

More information

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

LOGIC CIRCUITS. Basic Experiment and Design of Electronics Basic Experiment and Design of Electronics LOGIC CIRCUITS Ho Kyung Kim, Ph.D. hokyung@pusan.ac.kr School of Mechanical Engineering Pusan National University Outline Combinational logic circuits Output

More information

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1 Memory Elements I CS31 Pascal Van Hentenryck CS031 Lecture 6 Page 1 Memory Elements (I) Combinational devices are good for computing Boolean functions pocket calculator Computers also need to remember

More information

EE 209 Logic Cumulative Exam Name:

EE 209 Logic Cumulative Exam Name: EE 209 Logic Cumulative Exam Name: 1.) Answer the following questions as True or False a.) A 4-to-1 multiplexer requires at least 4 select lines: true / false b.) An 8-to-1 mux and no other logi can be

More information

Combinational vs. Sequential. Summary of Combinational Logic. Combinational device/circuit: any circuit built using the basic gates Expressed as

Combinational vs. Sequential. Summary of Combinational Logic. Combinational device/circuit: any circuit built using the basic gates Expressed as Summary of Combinational Logic : Computer Architecture I Instructor: Prof. Bhagi Narahari Dept. of Computer Science Course URL: www.seas.gwu.edu/~bhagiweb/cs3/ Combinational device/circuit: any circuit

More information

Sequential Logic. Road Traveled So Far

Sequential Logic. Road Traveled So Far Comp 2 Spring 25 2/ Lecture page Sequential Logic These must be the slings and arrows of outrageous fortune ) Synchronous as an implementation of Sequential 2) Synchronous Timing Analysis 3) Single synchronous

More information

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13 Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13 Ziad Matni Dept. of Computer Science, UCSB Administrative Re: Midterm Exam #2 Graded! 5/22/18

More information

Laboratory Exercise #8 Introduction to Sequential Logic

Laboratory Exercise #8 Introduction to Sequential Logic Laboratory Exercise #8 Introduction to Sequential Logic ECEN 248: Introduction to Digital Design Department of Electrical and Computer Engineering Texas A&M University 2 Laboratory Exercise #8 1 Introduction

More information

Design of Sequential Circuits

Design of Sequential Circuits Design of Sequential Circuits Seven Steps: Construct a state diagram (showing contents of flip flop and inputs with next state) Assign letter variables to each flip flop and each input and output variable

More information

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D. Basic Experiment and Design of Electronics LOGIC CIRCUITS Ho Kyung Kim, Ph.D. hokyung@pusan.ac.kr School of Mechanical Engineering Pusan National University Digital IC packages TTL (transistor-transistor

More information

Clocked Sequential Circuits UNIT 13 ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS. Analysis of Clocked Sequential Circuits. Signal Tracing and Timing Charts

Clocked Sequential Circuits UNIT 13 ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS. Analysis of Clocked Sequential Circuits. Signal Tracing and Timing Charts ed Sequential Circuits 2 Contents nalysis by signal tracing & timing charts State tables and graphs General models for sequential circuits sequential parity checker Reading Unit 3 asic unit Unit : Latch

More information

Problem Set 9 Solutions

Problem Set 9 Solutions CSE 26 Digital Computers: Organization and Logical Design - 27 Jon Turner Problem Set 9 Solutions. For each of the sequential circuits shown below, draw in the missing parts of the timing diagrams. You

More information

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Hakim Weatherspoon CS 3410 Computer Science Cornell University Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. memory inst 32 register

More information

CpE358/CS381. Switching Theory and Logical Design. Summer

CpE358/CS381. Switching Theory and Logical Design. Summer Switching Theory and Logical Design - Class Schedule Monday Tuesday Wednesday Thursday Friday May 7 8 9 - Class 2 - Class 2 2 24 - Class 3 25 26 - Class 4 27 28 Quiz Commencement 3 June 2 - Class 5 3 -

More information

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

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department Page of COE 22: Digital Logic Design (3--3) Term (Fall 22) Final Exam Sunday January

More information

CPE100: Digital Logic Design I

CPE100: Digital Logic Design I Chapter 3 Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu http://www.ee.unlv.edu/~b1morris/cpe1/ CPE1: Digital Logic Design I Section 14: Dr. Morris Sequential Logic Design Chapter 3 Chapter

More information

Sequential vs. Combinational

Sequential vs. Combinational Sequential Circuits Sequential vs. Combinational Combinational Logic: Output depends only on current input TV channel selector (-9) inputs system outputs Sequential Logic: Output depends not only on current

More information

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1 Synchronous Sequential Circuit Design Dr. Ehab A. H. AL-Hialy Page Motivation Analysis of a few simple circuits Generalizes to Synchronous Sequential Circuits (SSC) Outputs are Function of State (and Inputs)

More information

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

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing IT 204 Section 3.0 Boolean Algebra and Digital Logic Boolean Algebra 2 Logic Equations to Truth Tables X = A. B + A. B + AB A B X 0 0 0 0 3 Sum of Products The OR operation performed on the products of

More information

vidyarthiplus.com vidyarthiplus.com vidyarthiplus.com ANNA UNIVERSITY- COMBATORE B.E./ B.TECH. DEGREE EXAMINATION - JUNE 2009. ELECTRICAL & ELECTONICS ENGG. - FOURTH SEMESTER DIGITAL LOGIC CIRCUITS PART-A

More information

ECE 341. Lecture # 3

ECE 341. Lecture # 3 ECE 341 Lecture # 3 Instructor: Zeshan Chishti zeshan@ece.pdx.edu October 7, 2013 Portland State University Lecture Topics Counters Finite State Machines Decoders Multiplexers Reference: Appendix A of

More information

or 0101 Machine

or 0101 Machine Synchronous State Graph or Synchronous State Graph or Detector Design a state graph for a machine with: One input X, one output Z. Z= after receiving the complete sequence or Overlapped sequences are detected.

More information

Finite State Machines CS 64: Computer Organization and Design Logic Lecture #15 Fall 2018

Finite State Machines CS 64: Computer Organization and Design Logic Lecture #15 Fall 2018 Finite State Machines CS 64: Computer Organization and Design Logic Lecture #15 Fall 2018 Ziad Matni, Ph.D. Dept. of Computer Science, UCSB Administrative The Last 2 Weeks of CS 64: Date L # Topic Lab

More information

Unit 7 Sequential Circuits (Flip Flop, Registers)

Unit 7 Sequential Circuits (Flip Flop, Registers) College of Computer and Information Sciences Department of Computer Science CSC 220: Computer Organization Unit 7 Sequential Circuits (Flip Flop, Registers) 2 SR Flip-Flop The SR flip-flop, also known

More information

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1>

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1> Chapter 3 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 3 Chapter 3 :: Topics Introduction Latches and Flip-Flops Synchronous Logic Design Finite

More information

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

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd.. Indian Institute of Technology Jodhpur, Year 2017-2018 Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd.. Course Instructor: Shree Prakash Tiwari Email: sptiwari@iitj.ac.in

More information

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering An FSM with No Inputs Moves from State to State What happens if an FSM has no inputs? ECE 120: Introduction to Computing

More information

P2 (10 points): Given the circuit below, answer the following questions:

P2 (10 points): Given the circuit below, answer the following questions: P1 (10 points): Given the function f(a, b, c, d) = m(3,4,5,10,14) + D(6,7): A: Fill in the timing diagram for f. B: Implement f using only 2-1 MUXes. Your circuit should not include more than four 2-1

More information

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

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering TIMING ANALYSIS Overview Circuits do not respond instantaneously to input changes

More information

ELEN Electronique numérique

ELEN Electronique numérique ELEN0040 - Electronique numérique Patricia ROUSSEAUX Année académique 2014-2015 CHAPITRE 3 Combinational Logic Circuits ELEN0040 3-4 1 Combinational Functional Blocks 1.1 Rudimentary Functions 1.2 Functions

More information

UNIVERSITY OF WISCONSIN MADISON

UNIVERSITY OF WISCONSIN MADISON CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Minsub Shin, Lisa Ossian, Sujith Surendran Midterm Examination 2 In Class (50 minutes) Friday,

More information

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary EECS50 - Digital Design Lecture - Shifters & Counters February 24, 2003 John Wawrzynek Spring 2005 EECS50 - Lec-counters Page Register Summary All registers (this semester) based on Flip-flops: q 3 q 2

More information

Chapter 3 Digital Logic Structures

Chapter 3 Digital Logic Structures Chapter 3 Digital Logic Structures Original slides from Gregory Byrd, North Carolina State University Modified by C. Wilcox, M. Strout, Y. Malaiya Colorado State University Computing Layers Problems Algorithms

More information

Logic Design II (17.342) Spring Lecture Outline

Logic Design II (17.342) Spring Lecture Outline Logic Design II (17.342) Spring 2012 Lecture Outline Class # 10 April 12, 2012 Dohn Bowden 1 Today s Lecture First half of the class Circuits for Arithmetic Operations Chapter 18 Should finish at least

More information

Sequential Logic (3.1 and is a long difficult section you really should read!)

Sequential Logic (3.1 and is a long difficult section you really should read!) EECS 270, Fall 2014, Lecture 6 Page 1 of 8 Sequential Logic (3.1 and 3.2. 3.2 is a long difficult section you really should read!) One thing we have carefully avoided so far is feedback all of our signals

More information

Design of Datapath Controllers

Design of Datapath Controllers Design of Datapath Controllers Speaker: 俞子豪 Adviser: Prof. An-Yeu Wu ACCESS IC LAB Outline vsequential Circuit Model vfinite State Machines vuseful Modeling Techniques P. 2 Model of Sequential Circuits

More information

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

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science Sequential Logic Rab Nawaz Khan Jadoon DCS COMSATS Institute of Information Technology Lecturer COMSATS Lahore Pakistan Digital Logic and Computer Design Sequential Logic Combinational circuits with memory

More information

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec09 Counters Outline.

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec09 Counters Outline. Review: Designing with FSM EECS 150 - Components and Design Techniques for Digital Systems Lec09 Counters 9-28-04 David Culler Electrical Engineering and Computer Sciences University of California, Berkeley

More information

Fundamentals of Digital Design

Fundamentals of Digital Design Fundamentals of Digital Design Digital Radiation Measurement and Spectroscopy NE/RHP 537 1 Binary Number System The binary numeral system, or base-2 number system, is a numeral system that represents numeric

More information

Chapter 7 Sequential Logic

Chapter 7 Sequential Logic Chapter 7 Sequential Logic SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} March 28, 2016 Table of Contents 1 Intro 2 Bistable Circuits 3 FF Characteristics

More information

Lecture 13: Sequential Circuits, FSM

Lecture 13: Sequential Circuits, FSM Lecture 13: Sequential Circuits, FSM Today s topics: Sequential circuits Finite state machines Reminder: midterm on Tue 2/28 will cover Chapters 1-3, App A, B if you understand all slides, assignments,

More information

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

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1 Ch 7. Finite State Machines VII - Finite State Machines Contemporary Logic esign 1 Finite State Machines Sequential circuits primitive sequential elements combinational logic Models for representing sequential

More information

CSE 140 Midterm 3 version A Tajana Simunic Rosing Spring 2015

CSE 140 Midterm 3 version A Tajana Simunic Rosing Spring 2015 CSE 140 Midterm 3 version A Tajana Simunic Rosing Spring 2015 Name of the person on your left : Name of the person on your right: 1. 20 points 2. 20 points 3. 20 points 4. 15 points 5. 15 points 6. 10

More information

Lab 3 Revisited. Zener diodes IAP 2008 Lecture 4 1

Lab 3 Revisited. Zener diodes IAP 2008 Lecture 4 1 Lab 3 Revisited Zener diodes R C 6.091 IAP 2008 Lecture 4 1 Lab 3 Revisited +15 Voltage regulators 555 timers 270 1N758 0.1uf 5K pot V+ V- 2N2222 0.1uf V o. V CC V Vin s = 5 V Vc V c Vs 1 e t = RC Threshold

More information

Digital Electronics Sequential Logic

Digital Electronics Sequential Logic /5/27 igital Electronics Sequential Logic r. I. J. Wassell Sequential Logic The logic circuits discussed previously are known as combinational, in that the output depends only on the condition of the latest

More information

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

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring - Principles of Computer rchitecture Miles Murdocca and Vincent Heuring 999 M. Murdocca and V. Heuring -2 Chapter Contents. Introduction.2 Combinational Logic.3 Truth Tables.4 Logic Gates.5 Properties

More information

Fundamentals of Computer Systems

Fundamentals of Computer Systems Fundamentals of Computer Systems Review for the Midterm Stephen A. Edwards Columbia University Spring 22 The Midterm 75 minutes 4 5 problems Closed book Simple calculators are OK, but unnecessary One double-sided

More information

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010 EE 224: INTROUCTION TO IGITAL CIRCUITS & COMPUTER ESIGN Lecture 6: Sequential Logic 3 Registers & Counters 05/10/2010 Avinash Kodi, kodi@ohio.edu Introduction 2 A Flip-Flop stores one bit of information

More information

Sample Test Paper - I

Sample Test Paper - I Scheme G Sample Test Paper - I Course Name : Computer Engineering Group Marks : 25 Hours: 1 Hrs. Q.1) Attempt any THREE: 09 Marks a) Define i) Propagation delay ii) Fan-in iii) Fan-out b) Convert the following:

More information

Philadelphia University Student Name: Student Number:

Philadelphia University Student Name: Student Number: Philadelphia University Student Name: Student Number: Faculty of Engineering Serial Number: Final Exam, First Semester: 2017/2018 Dept. of Computer Engineering Course Title: Logic Circuits Date: 29/01/2018

More information

EECS150 - Digital Design Lecture 25 Shifters and Counters. Recap

EECS150 - Digital Design Lecture 25 Shifters and Counters. Recap EECS150 - Digital Design Lecture 25 Shifters and Counters Nov. 21, 2013 Prof. Ronald Fearing Electrical Engineering and Computer Sciences University of California, Berkeley (slides courtesy of Prof. John

More information

Example: vending machine

Example: vending machine Example: vending machine Release item after 15 cents are deposited Single coin slot for dimes, nickels o change Reset Coin Sensor Vending Machine FSM Open Release Mechanism Clock Spring 2005 CSE370 - guest

More information

EGR224 F 18 Assignment #4

EGR224 F 18 Assignment #4 EGR224 F 18 Assignment #4 ------------------------------------------------------------------------------------------------------------- Due Date: Friday (Section 10), October 19, by 5 pm (slide it under

More information

S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques

S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques Time: 3 Hrs.] Prelim Question Paper Solution [Marks : 100 Q.1(a) Attempt any SIX of the following : [12] Q.1(a) (i) Derive AND gate and OR gate

More information

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

Computers also need devices capable of Storing data and information Performing mathematical operations on such data Sequential Machines Introduction Logic devices examined so far Combinational Output function of input only Output valid as long as input true Change input change output Computers also need devices capable

More information

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters) EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters) March 19&21, 2002 John Wawrzynek Spring 2002 EECS150 - Lec13-seq3 version 2 Page 1 Counters Special sequential circuits (FSMs) that

More information

Fundamentals of Computer Systems

Fundamentals of Computer Systems Fundamentals of Computer Systems Review for the Final Stephen A. Edwards Columbia University Summer 25 The Final 2 hours 8 problems Closed book Simple calculators are OK, but unnecessary One double-sided

More information

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3 Digital Logic: Boolean Algebra and Gates Textbook Chapter 3 Basic Logic Gates XOR CMPE12 Summer 2009 02-2 Truth Table The most basic representation of a logic function Lists the output for all possible

More information

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN ELCT201: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Following the slides of Dr. Ahmed H. Madian Lecture 10 محرم 1439 ه Winter

More information

Generalized FSM model: Moore and Mealy

Generalized FSM model: Moore and Mealy Lecture 18 Logistics HW7 is due on Monday (and topic included in midterm 2) Midterm 2 on Wednesday in lecture slot cover materials up to today s lecture Review session Tuesday 4:15pm in EEB125 Last lecture

More information