Skip to content

VLSIFacts

Let's Program the Transistors

  • Home
  • DHD
    • Digital Electronics
    • Fault Tolerant System Design
    • TLM
    • Verification
    • Verilog
    • VHDL
    • Xilinx
  • Embedded System
    • 8085 uP
    • 8086 uP
    • 8051 uC
  • VLSI Technology
    • Analog Electronics
    • Memory Devices
    • VLSI Circuits
  • Interview
    • Interview Experience
    • Training Experience
    • Question Bank
  • Notifications
  • QUIZ
  • Community
  • Job Board
  • Contact Us

Mealy Vs. Moore Machine

Posted on February 1, 2016June 17, 2025 By vlsifacts 6 Comments on Mealy Vs. Moore Machine

Design of sequential circuit can be composed of designing combinational circuit and state register. Sequential circuits are implemented in two different ways:

  1. Mealy Machine
  2. Moore Machine

We can represent a sequential machine as M = <I,O,S,f,g>; where

I: Input set
O: Output set
S: State space
f: A function mapping IxS = O
g: A function mapping IxS = S

Let’s understand both type of sequential machines and compare them.

Mealy Machine

In case of Mealy machine, output is a function of not only the present inputs but also past inputs. In other words we can say; in case of Mealy, both output and the next state depends on the present input and the present state.

Mealy Machine
Mealy Machine: (a) Block Diagram, (b) State Transition Diagram

PS: Present State
NS: Next State [NS becomes PS after every sensitive edge of clock pulse]
CLK: Clock Signal

f: IxS => O

So, output function:

o(t) = f(i(t),s(t))

       = f(i(t),PS(t))

Similarly

g: IxS => S

So, Next state function:

s(t+1) = g(i(t),s(t))

NS(t)  = g(i(t),PS(t))

Moore Machine

In case of Moore machine, present output is not a function of present inputs but is a function of past inputs. The next state is a function of both the present input and the present state.

In this case the output is not associated with the transition but are associated with the state unlike the Mealy machine. This is because the output “O” is a function of present state (PS) and independent of present input “I”.

Of-course present input I influences the next state (NS) and that’s how it is going to influence the output but there is a time lag between the input and output. The present inputs are going to influence the outputs that are going to come after the next clock.

Moore Machine
Moore Machine: (a) Block Diagram, (b) State Transition Diagram

f: S => O

So, output function:

o(t) = f(s(t))

       = f(PS(t))

Similarly

g: IxS => S

So, Next state function:

s(t+1) = g(i(t),s(t))

NS(t)  = g(i(t),PS(t))


Click here to learn how to transform a Mealy machine to a Moore machine and vice versa.


Mealy Vs. Moore: A Comparison

Mealy MachineMoore Machine
Mealy machine changes its output based on its current input and present stateOutput of Moore machine only depends on its current state and not on the current input
From presentation point of view, output is placed on transition Output is placed on state
Mealy will be faster, in the sense that output will change as soon as an input transition occursMoore machine may be safer to use, because they change states on the clock edge
Asynchronous output generation though the state changes synchronous to the clockBoth output and state change synchronous to the clock edge
FasterPredictable
Generally needs less states for synthesis. So less hardware required to design. Less states doesn’t always mean simpler to implementIn general needs more states for synthesis. Advantage of Moore model is simplification of behavior and easy to design

Spread the Word

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print

Like this:

Like Loading...

Discover more from VLSIFacts

Subscribe to get the latest posts sent to your email.

Related posts:

  1. Mealy to Moore and Moore to Mealy Transformation
  2. State Machine Synthesis
  3. State Machine Diagram for Pattern Recognition / Sequence Detector
  4. Circuit Design of a Sequence Detector
DHD, Digital Electronics Tags:FSM, Mealy Machine, Mealy Vs. Moore, Moore Machine, State Machine

Post navigation

Previous Post: Different Coding Styles of Verilog Language
Next Post: Mealy to Moore and Moore to Mealy Transformation

Comments (6) on “Mealy Vs. Moore Machine”

  1. subham says:
    October 8, 2016 at 12:13 am

    Excellent

    Reply
  2. Jatin says:
    June 20, 2018 at 5:25 pm

    Hi, there is one major and important difference between these two : mealy removes glitches but Moore doesn’t. Hence mealy circuits are preferred mostly. Interviewer generally ask about this glitch issue.

    Reply
    1. Sidhartha says:
      August 15, 2018 at 10:23 am

      Hi Jatin,

      Thanks for raising the point. But I think the generation of glitch is other way around. There is a possibility of glitches in case of Mealy while Moore is a more stable model.

      Reply
      1. ARVIND RAM RAM BASKARAN says:
        October 17, 2018 at 2:20 am

        I didnt get Jatin’s point can you please explain more ?

        Reply
        1. Craig says:
          March 24, 2019 at 1:39 pm

          Arvind,

          Yeah, I don’t know what Jatin is driving at, in that “mealy removes glitches and the moore doesn’t”. I think it’s the other way around. In the moore machine the output is dependent only on the current state. The state and output will change on a positive edge clock cycle, and be locked in for the duration of the negative edge clock cyle-This prevents ‘glitches’.

          On the other hand, the Mealy maching output is dependent on BOTH the current state and the input. This means fluctuations in the input produces fluctuations in the output regardless if the clock cycle is negative or positive (THE OUTPUT IS NOT LOCKED IN). This has the potential for producing ‘glitches’.

          The Mealy’s benefit is that the finite state machine can usually be constructed with a fewer number of states when compared to the Moore.

          Reply
          1. Sidhartha says:
            March 24, 2019 at 6:24 pm

            Thanks Chirag for the clear explanation. Moore is a more stable state machine model as its output changes at the clock edge. While Mealy changes its out put asynchronously (that means whenever there is a change in the input). But in most of the times Mealy takes less state to implement the state machine leading to less hardware cost.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top Posts & Pages

  • AND and OR gate using CMOS Technology
  • NAND and NOR gate using CMOS Technology
  • VLSI ROADMAP (2026 Ready) — From Beginner to Job-Ready
  • ASCII Code
  • Circuit Design of a 4-bit Binary Counter Using D Flip-flops

Copyright © 2026 VLSIFacts.

Powered by PressBook WordPress theme

%d