Intuition The one core idea
A Finite State Machine is a machine with memory : it sits on one of a small number of "situations" (states), and every clock tick it reads an input, decides which situation to jump to next, and produces an output. Everything else on the parent page — the 6-tuple, Mealy vs Moore, flip-flop counts — is just a precise way of describing which situation, when we jump, and what we say .
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.
A state is one specific "situation the machine remembers being in." Think of it as one square on a board game where your marker sits.
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 .
Intuition Why we need states at all
A plain combinational circuit answers "given the inputs right now , what is the output?" — it has no past. But a vending machine must remember "you already put in 5 rupees." That memory is exactly a state. Without states there is no memory, and without memory there is no FSM.
The symbol for the whole collection of bubbles is S (capital S, for the S et of S tates). We write individual bubbles S 0 , S 1 , S 2 , … — the little number is just a name tag, not a quantity.
The two vertical bars ∣ ⋅ ∣ mean "the size of" (count the members). So ∣ S ∣ reads aloud as "the number of states."
Worked example Reading the bars
If S = { S 0 , S 1 , S 2 } then ∣ S ∣ = 3 . Three bubbles, so ∣ S ∣ = 3 .
Why the topic needs this: the cost of the machine in hardware grows with ∣ S ∣ , so we count them constantly.
The picture: a bubble that lives inside the fenced-off region S . The parent writes s 0 ∈ S — meaning "the start bubble is one of our bubbles." (Of course it is; the symbol just says so formally.)
s 0 is the one bubble the machine sits on when it first switches on (after reset). The subscript 0 just means "number zero — the starting one."
The picture: an arrow coming from nowhere into one bubble, marking "start here."
Common mistake "The machine just starts somewhere sensible."
Why it feels right: on paper you choose where the marker begins.
The fix: real flip-flops power up holding random garbage. You must physically force s 0 with a reset wire, or the machine's behaviour is undefined. That is why s 0 is a named part of the definition, not an afterthought.
Definition Input and output sets
I = the set of input symbols the machine can read each tick (e.g. I = { 0 , 1 } for one input wire).
O = the set of output symbols the machine can produce (e.g. O = { 0 , 1 } ).
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. I names what it can read; O names what it can say.
Before the parent's δ and λ make sense you must know what a function is and what the arrow → means.
Definition Function and its arrow
A function is a rule that takes something in and gives exactly one thing back. We write f : A → B to mean "f is a rule that eats a member of A and produces a member of B ." The arrow → points from what goes in to what comes out .
The picture: a box with an input slot on the left (A ) and an output slot on the right (B ), and inside, a rulebook.
Intuition Why a function, not just a table?
A transition table is a function written out row by row. Writing it as f : A → B is just the compact way to say "for every possible (situation, card) pair there is exactly one destination." The word "exactly one" is what makes hardware deterministic — no square has two contradicting arrows for the same card.
× in S × I
S × I means the set of all possible pairs (a state, an input) — one bubble and one card, considered together.
The picture: a grid. Down the side you list every bubble; across the top every input symbol; each cell is one pair ( state , input ) .
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 S × I . This grid is the transition table.
Definition The transition function delta
δ : S × I → S (Greek letter delta , for d estination). It reads a (current state, input) pair and returns the next state to jump to.
The picture: an arrow leaving one bubble, labelled with the input that causes it, landing on another bubble.
Definition The output function lambda
λ (Greek lambda , for l abel) is the rule that decides what the machine says . There are two possible shapes:
Moore: λ : S → O — output depends on the bubble only .
Mealy: λ : S × I → O — output depends on the bubble AND the card .
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).
Intuition The entire Mealy/Moore boundary is one wire
Compare the two type signatures. Moore's λ has no I in it; Mealy's does. In hardware that literally means: is the input wire connected to the output-logic block, yes or no? That single wire is the whole distinction the parent note builds its comparison table around.
Mnemonic delta moves, lambda labels
d elta → d estination (moves the marker). l ambda → l abel (what you say). If you ever forget which is which, remember δ ends on S (a state) and λ ends on O (an output).
A tuple is just an ordered shopping list wrapped in parentheses. Now every item on the parent's list is something you built:
Definition Clock, current state Q, next state Q-plus
The clock is a signal that ticks (0→1) at fixed moments; the machine only ever changes at a tick edge.
Q = the current state stored in the flip-flops right now .
Q + (read "Q-plus") = the state stored just after the next tick .
The picture: a row of memory cells (Flip-flops ) whose value is Q ; on a clock edge they overwrite themselves with Q + .
The parent uses n = ⌈ log 2 ∣ S ∣ ⌉ . Two new symbols to earn.
Definition Logarithm base 2
log 2 x answers the question: =="2 to what power gives x ?"== It is the reverse of doubling. log 2 8 = 3 because 2 3 = 8 .
Why base 2 and not any other tool? Because each flip-flop stores one bit — a thing with exactly 2 possible values. Put n of them together and you get 2 n distinct patterns (doubling per flip-flop). To label ∣ S ∣ bubbles uniquely you need 2 n ≥ ∣ S ∣ , and undoing the "2 n " is exactly log 2 .
Why round up, never down? You cannot own 1.6 flip-flops. If the maths asks for 1.6 bits you must buy 2 whole flip-flops, so we always ceiling.
Worked example 3 states, how many flip-flops?
log 2 3 ≈ 1.585 , and ⌈ 1.585 ⌉ = 2 . So 3 states need 2 flip-flops. (And so do 2 states, and 4 states — this is why "more states" does not always mean "more flip-flops," the third parent mistake.)
Membership and initial state s0
Input set I and output set O
Test yourself — cover the right side and answer each aloud before revealing.
What does ∣ S ∣ mean? The number of states (count the bubbles).
Read s 0 ∈ S in plain words. The initial/start state is one of the states in the set S .
What does the arrow in f : A → B tell you? f is a rule taking a member of A (in) and producing exactly one member of B (out).
What is a member of S × I ? A pair (one state, one input) — one cell of the transition table.
What does δ : S × I → S 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 λ : S → O uses state only; Mealy λ : S × I → O 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 Q + ? The state stored just after the next clock edge, equal to δ ( Q , I ) .
Why is the flip-flop count a log 2 ? Each flip-flop stores 1 bit, so n flip-flops give 2 n patterns; undoing 2 n to reach ∣ S ∣ is log 2 .
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 ⌈ log 2 3 ⌉ = ⌈ 1.585 ⌉ = 2 .
Parent: Finite State Machines — the topic these symbols unlock
Flip-flops — the cells that physically store Q
Combinational Logic — builds the δ and λ rules
Sequential Circuits — the family this machine belongs to
State encoding — how bubbles become bit-patterns, where log 2 bites
Clocking and timing — the tick that turns δ into Q +
State minimization — shrinking ∣ S ∣ to save flip-flops
Sequence detectors — the worked-example application