|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sequential circuits vs.
combinational |
|
|
|
|
|
|
|
Comparison to
combinational |
|
|
|
|
Combinational circuits
implement Boolean functions |
|
|
|
Input ---> output, no
memory |
|
|
|
|
Only data inputs and
control inputs determine the output |
|
|
|
Example: Coke (um, Pepsi)
machine |
|
|
|
|
|
|
|
Assume: |
price 75 cents, machine
only accepts quarters |
|
|
|
|
Action: |
|
|
|
|
|
|
|
|
deposit quarter --->
no output |
|
|
|
|
|
|
deposit quarter --->
no output |
|
|
|
|
|
|
deposit quarter --->
drink delivered |
|
|
|
|
|
|
Notice that the output
was not always the same for the same input |
|
|
|
|
|
This is not a Boolean
function (combinational circuit) |
|
|
|
|
|
Memory was used to
determine output along with input |
|
|
|
|
Example: linked list
object |
|
|
|
|
|
|
|
|
call list.size() method |
|
|
|
|
|
|
What is input? empty |
|
|
|
|
|
Does it always return
same value? |
|
|
|
|
|
|
No, its output is the
current length of the linked list |
|
|
|
Sequential circuit |
|
|
|
|
|
|
Inputs: values x,
labelled with subscripts |
|
|
|
|
|
Outputs: values z,
labelled with subscripts |
|
|
|
|
|
Uses clock, unlike
combinational circuit |
|
|
|
|
|
State |
|
|
|
|
|
|
made up of devices called
flip-flops |
|
|
|
|
|
k flip-flops store a
k-bit number representing the current state |
|
|
|
values denoted by q with
subscripts |
|
|
|
|
|
Output z computed from |
|
|
|
|
|
|
inputs x |
|
|
|
|
|
|
|
|
state q |
|
|
|
|
|
|
|
Needed: |
|
|
|
|
|
|
|
|
store current state |
|
|
|
|
|
|
|
|
update to new state |
|
|
|
|
|
|
|
Circuit elements |
|
|
|
|
|
|
|
|
Combinational logic |
|
|
|
|
|
|
|
|
Clock |
|
|
|
|
|
|
|
|
State storage |
|
|
|
|
|
|
Example |
|
|
|
|
|
|
state |
input |
output |
new state |
|
|
|
|
|
|
00 |
1 |
10 |
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|