Contents

Digital Electronics
Number Systems
Logic Gates
Boolean Algebra
Combinational Circuits
Sequential Circuits
Memory & PLDs
Digital System Design
Other Topics
Other Subjects
Section Progress85%

23 of 27 articles

Moore State Machine

Output depends only on state, more stable outputs.

Darshan N
Updated: 7 April 2026
7 min read

Elevator floor indicators and digital lock displays use Moore machines because the output depends only on the current state, not the live input. This makes the output glitch-free and easy to decode in real hardware — every state has a fixed, stable output.

Moore State Machine — Structure and ExampleMoore Machine BlockInput X ────────────────────── ┌─────────┐ State FB─►│Next ├─► FF ──►┌──────┐── Z │State │ │Output│(combinational) (register) │Logic │(combinational of state only)State Diagram — 1011 Detector (Moore)S0Z=0S1Z=0S2Z=0S3Z=0S4Z=1X=1X=0X=0X=1X=1
Figure 1: Moore machine. Output Z is written inside the state circle and depends only on the state, not the input.

Core Concept

A Moore machine computes its output from the present state only. The output logic block receives only the state register bits — the input X does not feed into it. This separates input-driven state transitions from output generation.

Because the output changes only when the state changes (on a clock edge), Moore outputs are synchronised to the clock. This eliminates combinational glitches. The penalty is one extra state compared to an equivalent Mealy machine — the Moore model needs a dedicated output state, while Mealy produces output on the arc leading to that state.

Moore machines are implemented with D flip-flops (74HC74, 74HC175) plus combinational output gates. A 4-state Moore machine needs 2 flip-flops (74HC74 dual D-FF), while up to 16 states need 4 flip-flops (74HC175). The output gates are typically basic AND/OR/NOT combinations of the state bits.

Boolean Expression

Next state: NS = f(PS, X) (same as Mealy — input affects state transitions). Output: Z = g(PS) (state only — no X). In the state diagram, the output label Z appears inside the state circle alongside the state name. Each state has one fixed output value regardless of which arc brought the machine into that state.

Example
Moore machine: detect input sequence 1011
States: S0(Z=0), S1(Z=0), S2(Z=0), S3(Z=0), S4(Z=1)
S4 is the dedicated output state (one more than Mealy''s 4 states)

State Transition Table:
PS   X=0    X=1    Z
S0   S0     S1     0
S1   S2     S1     0
S2   S0     S3     0
S3   S0     S4     0
S4   S2     S1     1  ← output 1 occurs while IN this state

Trace input: 1 0 1 1
  Start at S0, Z=0
  X=1: go to S1, Z=0
  X=0: go to S2, Z=0
  X=1: go to S3, Z=0
  X=1: go to S4, Z=1  ← sequence detected, Z=1 this clock cycle
  (next input decides whether machine goes to S2 or S1 from S4)

Comparison with Mealy:
  Mealy: 4 states, output on arc S3→S0 when X=1
  Moore: 5 states, output inside state S4
  Moore output is clock-synchronized; Mealy output appears with the input.

Final Answer:
  Moore machine needs 5 states for 1011 detection vs Mealy''s 4 states.
  Output Z=1 in the clock cycle when the machine is in state S4.
Exam Tip: Moore output is inside the state bubble; Mealy output is on the arc. GATE regularly tests this. Another trap: Moore machines need one more state than Mealy for the same sequence — be ready to justify this with the state table. Moore outputs are glitch-free because they change only on clock edges. If an exam question says ''output must be synchronous'' or ''glitch-free'', choose Moore over Mealy.

Key Properties

  • Output Z = g(Present State) only — input X does not appear in output logic
  • Output is synchronous (clock-edge aligned) — no combinational glitches on output
  • One more state typically required compared to equivalent Mealy machine
  • State diagram: output label inside the circle, transition label on arcs (input only)
  • Implemented with 74HC175 (4-bit state) plus AND/OR output decoding gates
  • n flip-flops support up to 2^n states; propagation delay 74HC175 = 14 ns at 5 V
  • Preferred for output-to-display or actuator control where glitches cause problems

Quick Revision

  • Moore: output depends on present state only; Z = g(PS)
  • Output is registered — changes only on clock edges, so it is glitch-free
  • One more state than equivalent Mealy machine
  • State diagram: output inside the state circle, arc labels are input only
  • Both Moore and Mealy share same next-state equation NS = f(PS, X)
  • Choose Moore when glitch-free synchronous output is needed
  • Choose Mealy when minimum state count or fastest output response is needed
  • Exam trap: putting output on the arc in a Moore diagram — that is the Mealy convention, not Moore.

Moore Machine Quiz

Test your understanding of Moore machine output stability, state diagrams, and design tradeoffs.

Question 1 of 3

Q1.A Moore machine output is a function of: