SlideShare a Scribd company logo
1 of 17
1
CSE370, Lecture 14
Lecture 17
u Logistics
n HW5 due on Wednesday
n HW6 will be out on Wednesday, due in one week
n Lab6 this week
u Last lecture
n Memory storage elements
n State diagrams
u Today
n Registers
n Counters
n Start of Finite State Machine (FSM)
17
2
CSE370, Lecture 14
The “WHY” slide
u Registers and Counters
n Registers and counters are very simple yet powerful examples
of how you can use the basic memory elements to conduct
productive behavior. They are used everywhere in a
computer.
u Finite State Machine
n This is what we have been waiting for in this class. Using
combinational and sequential logics, now you can design a lot
of clever digital logic circuits for functional products. We will
learn different steps you take to go from word problems to
logic circuits in the next few lectures.
17
3
CSE370, Lecture 14
Registers
u Group of storage elements read/written as a unit.
n Store related values (e.g. a binary word)
u Collection of flip-flops with common control
n Share clock, reset, set lines
u Example:
n Storage registers
n Shift registers
n Counters
17
4
CSE370, Lecture 14
Storage registers
u Basic storage registers uses flip flops
u Example: 4 bit storage register
R S R S R S
D Q D Q D Q D Q
OUT1 OUT2 OUT3 OUT4
CLK
IN1 IN2 IN3 IN4
R S
"0"
17
5
CSE370, Lecture 14
Shift registers
u Hold successively sampled input values
n Delays values in time
n Example: 4-bit shift register
í Stores 4 input values in sequence
D Q D Q D Q D Q
IN
OUT1 OUT2 OUT3 OUT4
CLK
17
6
CSE370, Lecture 14
Shift-register applications
u Parallel-to-serial conversion for signal transmission
u Pattern recognition (circuit recognizes 1001)
D Q D Q D Q D Q
IN
CLK
OUT
parallel inputs
parallel outputs
serial transmission
CLK CLK
17
7
CSE370, Lecture 14
D Q D Q D Q D Q
IN
OUT1 OUT2 OUT3 OUT4
CLK
Counters
u Ring counter: Sequence is 1000, 0100, 0010, 0001
n Assuming one of these patterns is the starting state
u Johnson counter: Sequence is 1000, 1100, 1110,
1111, 0111, 0011, 0001, 0000
D Q D Q D Q D Q
IN
OUT1 OUT2 OUT3 OUT4
CLK
17
8
CSE370, Lecture 14
A binary counter
u Has logic between flip-flops
D Q D Q D Q D Q
OUT1 OUT2 OUT3 OUT4
CLK
"1”
D1 D2 D3 D4
17
9
CSE370, Lecture 14
Combinational
Logic
Storage Elements
Outputs
State Outputs
State Inputs
Inputs
“States” for finite state machines are kept
in the storage elements
u Combinational logic and storage elements
n Localized feedback loops
n Choice of storage elements alters the logic
17
10
CSE370, Lecture 14
In = 0
In = 1
In = 0
In = 1
100
010
110
111
001
Finite-state machines (FSMs)
u States: Possible storage-element values
u Transitions: Changes in state
n Clock synchronizes the state changes
u Sequential logic
n Sequences through a series of states
n Based on inputs and present state
17
11
CSE370, Lecture 14
100 110
111
011
101
010
000
001
0
1
1 1
1
1
1
1
0
0
0
0 0
1
0
0
D Q D Q D Q
IN
OUT1 OUT2 OUT3
CLK
Drawing state diagrams
u Show input values
on transition arcs
u Show output values
in state nodes
17
12
CSE370, Lecture 14
010
100
110
011
001
000
101
111
3-bit up-counter
Counters revisited
u Great simple examples of state machines
n Output is the counter’s state
u Next state is well defined
n Does not depend on input (no inputs)
17
13
CSE370, Lecture 14
FSM design procedure (using counters)
1. Draw a state diagram
2. Draw a state-transition table
3. Encode the next-state functions
Minimize the logic using k-maps
4. Implement the design
We will use a ‘3-bit up counter’ as an example
17
14
CSE370, Lecture 14
1. Draw a state diagram
010
100
110
011
001
000
101
111
3-bit up-counter
17
15
CSE370, Lecture 14
2. Draw a state-transition table
Like a truth-table
State encoding is easy for counters  Use count value
current state next state
0 000 001 1
1 001 010 2
2 010 011 3
3 011 100 4
4 100 101 5
5 101 110 6
6 110 111 7
7 111 000 0
17
16
CSE370, Lecture 14
3. Encode the next state functions
Assume D flip-flops
as state elements
C3 C2 C1 N3 N2 N1
0 0 0 0 0 1
0 0 1 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 1 0 1
1 0 1 1 1 0
1 1 0 1 1 1
1 1 1 0 0 0
0 0 1 1
0 1 0 1
C2
C3
C1
N3
1 1 1 1
0 0 0 0
C2
C3
C1
N1
0 1 1 0
1 0 0 1
C2
C3
C1
N2
N1 := C1'
N2 := C1C2' + C1'C2
:= C1 xor C2
N3 := C1C2C3' + C1'C3 + C2'C3
:= C1C2C3' + (C1' + C2')C3
:= (C1C2) xor C3
17
17
CSE370, Lecture 14
D Q D Q D Q
OUT1 OUT2 OUT3
CLK
"1"
4. Implement the design
3 flip-flops hold state
Counter is synchronously clocked
Minimized logic computes next state
17

More Related Content

Similar to Lec17-Registers.ppt

Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterKatrina Little
 
EET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.pptEET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.pptBeautyKumar1
 
Sequential circuits Sequential circuits1
Sequential circuits Sequential circuits1Sequential circuits Sequential circuits1
Sequential circuits Sequential circuits1ssuser6feece1
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015Edhole.com
 
Design System Design-ASM and Asynchronous Sequential Circuits
Design System Design-ASM and Asynchronous Sequential CircuitsDesign System Design-ASM and Asynchronous Sequential Circuits
Design System Design-ASM and Asynchronous Sequential CircuitsIndira Priyadarshini
 
Digital Logic Counter.ppt
Digital Logic Counter.pptDigital Logic Counter.ppt
Digital Logic Counter.pptRaziyaSultana30
 
04 Unit IV DTE.pptx
04 Unit IV DTE.pptx04 Unit IV DTE.pptx
04 Unit IV DTE.pptxHarsheye
 
EC8392 Digital Electronics- Unit-3 -S.Sesha Vidhya-ASP-ECE-RMKCET
EC8392 Digital Electronics- Unit-3 -S.Sesha Vidhya-ASP-ECE-RMKCETEC8392 Digital Electronics- Unit-3 -S.Sesha Vidhya-ASP-ECE-RMKCET
EC8392 Digital Electronics- Unit-3 -S.Sesha Vidhya-ASP-ECE-RMKCETSeshaVidhyaS
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015Edhole.com
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14John Todora
 
Computer design and architecture with simple cpu
Computer design and architecture with simple cpuComputer design and architecture with simple cpu
Computer design and architecture with simple cpuNaohiko Shimizu
 
SEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptxSEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptxThanmayiKumar
 

Similar to Lec17-Registers.ppt (20)

Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
 
EET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.pptEET107_Chapter 3_SLD(part2.1)-edit1.ppt
EET107_Chapter 3_SLD(part2.1)-edit1.ppt
 
Sequential circuits Sequential circuits1
Sequential circuits Sequential circuits1Sequential circuits Sequential circuits1
Sequential circuits Sequential circuits1
 
9920Lec12 FSM.ppt
9920Lec12 FSM.ppt9920Lec12 FSM.ppt
9920Lec12 FSM.ppt
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Design System Design-ASM and Asynchronous Sequential Circuits
Design System Design-ASM and Asynchronous Sequential CircuitsDesign System Design-ASM and Asynchronous Sequential Circuits
Design System Design-ASM and Asynchronous Sequential Circuits
 
Sequential Logic
Sequential LogicSequential Logic
Sequential Logic
 
Digital Logic Counter.ppt
Digital Logic Counter.pptDigital Logic Counter.ppt
Digital Logic Counter.ppt
 
04 Unit IV DTE.pptx
04 Unit IV DTE.pptx04 Unit IV DTE.pptx
04 Unit IV DTE.pptx
 
EC8392 Digital Electronics- Unit-3 -S.Sesha Vidhya-ASP-ECE-RMKCET
EC8392 Digital Electronics- Unit-3 -S.Sesha Vidhya-ASP-ECE-RMKCETEC8392 Digital Electronics- Unit-3 -S.Sesha Vidhya-ASP-ECE-RMKCET
EC8392 Digital Electronics- Unit-3 -S.Sesha Vidhya-ASP-ECE-RMKCET
 
Dee2034 chapter 6 register
Dee2034 chapter 6 registerDee2034 chapter 6 register
Dee2034 chapter 6 register
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Fx570 ms 991ms_e
Fx570 ms 991ms_eFx570 ms 991ms_e
Fx570 ms 991ms_e
 
pandu-vivek (1)
pandu-vivek (1)pandu-vivek (1)
pandu-vivek (1)
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
 
Computer design and architecture with simple cpu
Computer design and architecture with simple cpuComputer design and architecture with simple cpu
Computer design and architecture with simple cpu
 
PPT 2nd unit course file.ppt
PPT 2nd unit course file.pptPPT 2nd unit course file.ppt
PPT 2nd unit course file.ppt
 
SEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptxSEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptx
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 

Recently uploaded

HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

Lec17-Registers.ppt

  • 1. 1 CSE370, Lecture 14 Lecture 17 u Logistics n HW5 due on Wednesday n HW6 will be out on Wednesday, due in one week n Lab6 this week u Last lecture n Memory storage elements n State diagrams u Today n Registers n Counters n Start of Finite State Machine (FSM) 17
  • 2. 2 CSE370, Lecture 14 The “WHY” slide u Registers and Counters n Registers and counters are very simple yet powerful examples of how you can use the basic memory elements to conduct productive behavior. They are used everywhere in a computer. u Finite State Machine n This is what we have been waiting for in this class. Using combinational and sequential logics, now you can design a lot of clever digital logic circuits for functional products. We will learn different steps you take to go from word problems to logic circuits in the next few lectures. 17
  • 3. 3 CSE370, Lecture 14 Registers u Group of storage elements read/written as a unit. n Store related values (e.g. a binary word) u Collection of flip-flops with common control n Share clock, reset, set lines u Example: n Storage registers n Shift registers n Counters 17
  • 4. 4 CSE370, Lecture 14 Storage registers u Basic storage registers uses flip flops u Example: 4 bit storage register R S R S R S D Q D Q D Q D Q OUT1 OUT2 OUT3 OUT4 CLK IN1 IN2 IN3 IN4 R S "0" 17
  • 5. 5 CSE370, Lecture 14 Shift registers u Hold successively sampled input values n Delays values in time n Example: 4-bit shift register í Stores 4 input values in sequence D Q D Q D Q D Q IN OUT1 OUT2 OUT3 OUT4 CLK 17
  • 6. 6 CSE370, Lecture 14 Shift-register applications u Parallel-to-serial conversion for signal transmission u Pattern recognition (circuit recognizes 1001) D Q D Q D Q D Q IN CLK OUT parallel inputs parallel outputs serial transmission CLK CLK 17
  • 7. 7 CSE370, Lecture 14 D Q D Q D Q D Q IN OUT1 OUT2 OUT3 OUT4 CLK Counters u Ring counter: Sequence is 1000, 0100, 0010, 0001 n Assuming one of these patterns is the starting state u Johnson counter: Sequence is 1000, 1100, 1110, 1111, 0111, 0011, 0001, 0000 D Q D Q D Q D Q IN OUT1 OUT2 OUT3 OUT4 CLK 17
  • 8. 8 CSE370, Lecture 14 A binary counter u Has logic between flip-flops D Q D Q D Q D Q OUT1 OUT2 OUT3 OUT4 CLK "1” D1 D2 D3 D4 17
  • 9. 9 CSE370, Lecture 14 Combinational Logic Storage Elements Outputs State Outputs State Inputs Inputs “States” for finite state machines are kept in the storage elements u Combinational logic and storage elements n Localized feedback loops n Choice of storage elements alters the logic 17
  • 10. 10 CSE370, Lecture 14 In = 0 In = 1 In = 0 In = 1 100 010 110 111 001 Finite-state machines (FSMs) u States: Possible storage-element values u Transitions: Changes in state n Clock synchronizes the state changes u Sequential logic n Sequences through a series of states n Based on inputs and present state 17
  • 11. 11 CSE370, Lecture 14 100 110 111 011 101 010 000 001 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 D Q D Q D Q IN OUT1 OUT2 OUT3 CLK Drawing state diagrams u Show input values on transition arcs u Show output values in state nodes 17
  • 12. 12 CSE370, Lecture 14 010 100 110 011 001 000 101 111 3-bit up-counter Counters revisited u Great simple examples of state machines n Output is the counter’s state u Next state is well defined n Does not depend on input (no inputs) 17
  • 13. 13 CSE370, Lecture 14 FSM design procedure (using counters) 1. Draw a state diagram 2. Draw a state-transition table 3. Encode the next-state functions Minimize the logic using k-maps 4. Implement the design We will use a ‘3-bit up counter’ as an example 17
  • 14. 14 CSE370, Lecture 14 1. Draw a state diagram 010 100 110 011 001 000 101 111 3-bit up-counter 17
  • 15. 15 CSE370, Lecture 14 2. Draw a state-transition table Like a truth-table State encoding is easy for counters  Use count value current state next state 0 000 001 1 1 001 010 2 2 010 011 3 3 011 100 4 4 100 101 5 5 101 110 6 6 110 111 7 7 111 000 0 17
  • 16. 16 CSE370, Lecture 14 3. Encode the next state functions Assume D flip-flops as state elements C3 C2 C1 N3 N2 N1 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 0 0 0 0 1 1 0 1 0 1 C2 C3 C1 N3 1 1 1 1 0 0 0 0 C2 C3 C1 N1 0 1 1 0 1 0 0 1 C2 C3 C1 N2 N1 := C1' N2 := C1C2' + C1'C2 := C1 xor C2 N3 := C1C2C3' + C1'C3 + C2'C3 := C1C2C3' + (C1' + C2')C3 := (C1C2) xor C3 17
  • 17. 17 CSE370, Lecture 14 D Q D Q D Q OUT1 OUT2 OUT3 CLK "1" 4. Implement the design 3 flip-flops hold state Counter is synchronously clocked Minimized logic computes next state 17