3.4.10 · D1Sequential Circuits

Foundations — Finite state machines (Mealy and Moore)

2,187 words10 min readBack to topic

Before you can read the parent note comfortably, you need to earn every symbol it throws at you. We build them one at a time, each resting on the last, each pinned to a picture.


1. A "state" — the machine's memory of where it is

The picture: a single labelled bubble. That bubble is the state. The whole set of bubbles is the machine's entire memory — nothing is remembered except which bubble we are on right now.

The symbol for the whole collection of bubbles is (capital S, for the Set of States). We write individual bubbles — the little number is just a name tag, not a quantity.


2. — "how many bubbles"

The two vertical bars mean "the size of" (count the members). So reads aloud as "the number of states."

Why the topic needs this: the cost of the machine in hardware grows with , so we count them constantly.


3. — "is a member of"

The picture: a bubble that lives inside the fenced-off region . The parent writes — meaning "the start bubble is one of our bubbles." (Of course it is; the symbol just says so formally.)


4. — the reset / initial state

The picture: an arrow coming from nowhere into one bubble, marking "start here."


5. and — inputs and outputs

The picture: a wire coming into the machine (input) and a wire going out (output). On a board game, the input is the card you read this turn; the output is the prize you collect.

Why both are needed: an FSM's whole job is to turn a stream of inputs over time into a stream of outputs. names what it can read; names what it can say.


6. Functions and the arrow (the heart of it)

Before the parent's and make sense you must know what a function is and what the arrow means.

The picture: a box with an input slot on the left () and an output slot on the right (), and inside, a rulebook.


7. The Cartesian product — "one from each, paired up"

The picture: a grid. Down the side you list every bubble; across the top every input symbol; each cell is one pair .

Why the topic needs it: the next-state rule must answer "where do I go?" for every combination of where-I-am and what-I-read. That combination is precisely a member of . This grid is the transition table.


8. — the next-state function

The picture: an arrow leaving one bubble, labelled with the input that causes it, landing on another bubble.


9. — the output function (where Mealy and Moore split)

The picture: in Moore the prize is printed inside the bubble; in Mealy the prize is printed on the arrow (so it also depends on which card you read to travel that arrow).


10. The 6-tuple

A tuple is just an ordered shopping list wrapped in parentheses. Now every item on the parent's list is something you built:


11. The clock, , and — from paper to flip-flops

The picture: a row of memory cells (Flip-flops) whose value is ; on a clock edge they overwrite themselves with .


12. and the ceiling — counting flip-flops

The parent uses . Two new symbols to earn.

Why base 2 and not any other tool? Because each flip-flop stores one bit — a thing with exactly 2 possible values. Put of them together and you get distinct patterns (doubling per flip-flop). To label bubbles uniquely you need , and undoing the "" is exactly .

Why round up, never down? You cannot own flip-flops. If the maths asks for bits you must buy whole flip-flops, so we always ceiling.


How these foundations feed the topic

State S and bubbles

Finite State Machine

Membership and initial state s0

Input set I and output set O

Function and arrow

delta next-state

lambda output

Cartesian product times

Clock and Q Qplus

log base 2 and ceiling

count flip-flops


Equipment checklist

Test yourself — cover the right side and answer each aloud before revealing.

What does mean?
The number of states (count the bubbles).
Read in plain words.
The initial/start state is one of the states in the set .
What does the arrow in tell you?
is a rule taking a member of (in) and producing exactly one member of (out).
What is a member of ?
A pair (one state, one input) — one cell of the transition table.
What does do?
Takes current state + input, returns the next state (moves the marker); no output involved.
What is the difference between Moore's and Mealy's ?
Moore uses state only; Mealy also uses the input.
In one sentence, what physical thing is the Mealy/Moore boundary?
Whether the input wire reaches the output-logic block (Mealy yes, Moore no).
What is ?
The state stored just after the next clock edge, equal to .
Why is the flip-flop count a ?
Each flip-flop stores 1 bit, so flip-flops give patterns; undoing to reach is .
Why the ceiling on the flip-flop count?
You can only buy whole flip-flops, so always round the bit-count up.
How many flip-flops do 3 states need, and why?
2, because .

Connections

  • Parent: Finite State Machines — the topic these symbols unlock
  • Flip-flops — the cells that physically store
  • Combinational Logic — builds the and rules
  • Sequential Circuits — the family this machine belongs to
  • State encoding — how bubbles become bit-patterns, where bites
  • Clocking and timing — the tick that turns into
  • State minimization — shrinking to save flip-flops
  • Sequence detectors — the worked-example application