Finite-State Machines

Sequential Machines

Sequential Logic

 

They're all around us!


The Roles of Finite-State Machines


A finite-state machine is like a "crippled" Turing machine:

It can only move its head in one direction, changing old symbol to new.


A finite-state machine is like a grammar without recursion:


A finite-state machine can do more than the logic circuits we have studied so far.


Combinational vs. Sequential Logic

Combinational "add-1" unit:

Sequential add1 unit:


The sequential unit can be derived from a modular realization of the combinational one:


The truth table for one module:


Possible realizations of m


A sequential add1 unit re-uses the same module

by "feeding back" the c output to the b input.


b is assumed to be 1 initially


To indicate that c is actually delayed before feeding to a:

It is assumed the delay is timed so that the current c output (= next b input) coincides with the next a input.

(More on this later)


In a certain way, the sequential add1 is more versatile than the combinational one. How?


The logic-structural view is a good one for building the device, but not terribly good for understanding what it does.

One way to achieve the latter is through a mental simulation.


Another is through the construction of a state-transition diagram :


    input: 1101      ouput: 0011


or, equivalently, state-transition table


A system such as above with

Finite set of states

Finite input alphabet

Finite output alphabet

is called a finite-state machine.

 

Above, we achieved a description by "reverse engineering" a logic circuit.

Usually we start by creating the description, then build the logic circuit from that.


Example

A machine which generates an alarm (a) if two 1's ever occur without an intervening 0.

If there is no alarm, n is ouput.

When a 0 arrives after an alarm, the machine resets to its initial state.

Otherwise the alarm repeats.


Multiply-by-3

Think "mixed radix" arithmetic

It will never require a carry > 2 since