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 to Moore and Moore to Mealy Transformation

Posted on February 2, 2016May 18, 2025 By vlsifacts 12 Comments on Mealy to Moore and Moore to Mealy Transformation

Sequential machines can be designed in two different ways: (i) Mealy Machine & (ii) Moore Machine

Considering Mealy or Moore for the designing of sequential machine, it’s actually difficult to draw a hard line where one machine is always better than the other. Depending on the application requirement one may dominate the other. It is very important to learn the transformation from one machine to another for the same design, so that required implementation can be done according to the demand.


Click here to know more about Mealy and Moore Machines


Mealy to Moore Transformation

Follow the below steps to transform a Mealy machine to a Moore machine:

  1. For every state with distinct outputs on incident edges, split it into as many states as number of distinct outputs
  2. Associate the edge output with the state
  3. Redirect the edge appropriately
  4. Define the new edges from the split states as per the original Mealy machine

Example

Following is an example of Mealy machine. We would learn how to convert this Mealy to its equivalent Moore machine.

State Transition Diagram of a Mealy Machine
State Transition Diagram of a Mealy Machine
  • There is only one incident edge with output “0” on state S0. So, no splitting of state in Moore machine. Let’s S0(Mealy) ⇒ S0(Moore)
  • There are 2 incident edges with outputs “1” and “0” on state S1. So, splitting needed in Moore machine. Let’s S1(Mealy) ⇒ For Moore S10{with output “0”} and S11{with output “1”}
  • There are 2 incident edges with outputs “1” and “0” on state S2. So, splitting needed in Moore machine. Let’s S2(Mealy) ⇒ For Moore S20{with output “0”} and S21{with output “1”}
Moore for (Mealy to Moore)
State Transition Diagram of equivalent Moore Machine

Now you can match the color of the transition lines in both Mealy and Moore and realize why some of the lines are split and some are not. Any doubt, please drop a comment below.

Moore to Mealy Transformation

Follow the below steps to transform a Mealy machine to a Moore machine:

  1. In case of Mealy to Moore, the output was postponed, but in case of Moore to Mealy, the output would be preponed
  2. The output associated to a particular state is going to get associated with the incident transition arcs. In the Mealy model the output will go to the edges rather than the states
  3. Here we have to notice the states which can merge actually. For this we have to check whether are there states for the same input, they are going to the same next state.

Example

Following is an example of Moore machine. We would learn how to convert this Moore to its equivalent Mealy machine.

State Transition Diagram of a Moore Machine
State Transition Diagram of a Moore Machine
  • In the above Moore machine “A” and “D” are two states which can be merged to a single state as we can see for both the states for same input the next state is same.
    • For input “1”, next state is “C” for both the present states “A” and “D”
    • For input “0”, next state is “B” for both the present states “A” and “D”
Mealy for (Moore to Mealy)
State Transition Diagram of equivalent Mealy Machine

Here we can see that states “A” and “D” are merged to a single state AD’. Now you can match the color of the transition lines in both Moore and Mealy and realize why some of the lines are merged and some are not. Any doubt, please drop a comment below.

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 Vs. Moore Machine
  2. State Machine Synthesis
  3. State Machine Diagram for Parity Generator
  4. Circuit Design of a Sequence Detector
DHD, Digital Electronics Tags:FSM, Mealy Machine, Mealy to Moore Transformation, Moore Machine, Moore to Mealy Transformation

Post navigation

Previous Post: Mealy Vs. Moore Machine
Next Post: Truth Tables, Characteristic Equations and Excitation Tables of Different Flipflops

Comments (12) on “Mealy to Moore and Moore to Mealy Transformation”

  1. Jahanzaib says:
    May 19, 2017 at 2:23 am

    What is meant by Incident Edges ??

    Reply
    1. Sidhartha says:
      May 19, 2017 at 2:24 pm

      Incident Edges are the cords coming on to the states.

      Reply
      1. Bijay Samal says:
        April 11, 2019 at 9:55 am

        wrong answer…

        Reply
        1. Sidhartha says:
          April 11, 2019 at 10:12 am

          Dear Bijay,
          As per my knowledge, I have given the correct answer. If you feel that it is wrong, then please rectify it and give the correct answer.

          Reply
  2. Manos K says:
    December 7, 2017 at 1:22 am

    Hello!
    Nice tutorial. Just a question. I found in literature and on the Internet, that the outputs of a state at a Mealy state diagram are placed on the outgoing edges of the states rather than on the incoming (incident) edges as you show. Is it correct?

    Reply
    1. Sidhartha says:
      December 7, 2017 at 6:34 am

      Hi Manos,
      It’s correct. The output can be on both outgoing as well as on incoming edges. Or I would say it should be on both the edges. Since the edges indicate the transition from a particular state to another state and the output shows the result of that particular transition.

      Reply
      1. Manos K says:
        December 7, 2017 at 11:07 am

        Yes, indeed.
        But as I understand, placing the outputs of a state on its incoming edges infers that the outputs are registered and that a look-ahead logic is used so that the outputs will be correct.
        On the other hand, placing the outputs of a state on its outgoing edges infers that the outputs are not registered.
        Am I understaning right? If so, then the two different Mealy designs may result to different Moore to Mealy transformations as the state minimization will be different.
        Maybe I am overcomplicating this.
        Anyway, thanks for the article and your response. 🙂

        Reply
        1. Sidhartha says:
          December 7, 2017 at 2:17 pm

          Dear Manos,

          Can you please elaborate your concern. I mean in detail (registered and unregistered output).

          Reply
  3. Swapna says:
    February 8, 2019 at 6:03 pm

    Don’t we have initial state in converting one machine to another..?

    Reply
    1. Sidhartha says:
      February 23, 2019 at 7:56 am

      You always need an initial state while designing a state machine. But while you are converting a state machine from one model to another (i.e, mealy to moore or vice versa), then you have already an initial state in the design.

      Reply
  4. Yolanda says:
    June 29, 2019 at 2:11 am

    In mealy machine ,as soon as the input bit is one..the output will become logic high.It need not go into another state. Now let us see for Moore machine … It is in the state which recognised the bit equence of 10 and state output is low. …

    Reply
  5. Muhammad Fayaz says:
    July 1, 2020 at 5:32 pm

    As we studied in many books that While converting from Moore to Mealy machine the number of states remains same for both Moore and Mealy machine,
    So what if we don’t merge and.

    Reply

Leave a Reply Cancel reply

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

Top Posts & Pages

  • NAND and NOR gate using CMOS Technology
  • Circuit Design of a 4-bit Binary Counter Using D Flip-flops
  • AND and OR gate using CMOS Technology
  • Truth Tables, Characteristic Equations and Excitation Tables of Different Flipflops
  • Understanding the 4-bit Ripple Carry Adder: Verilog Design and Testbench Explained

Copyright © 2025 VLSIFacts.

Powered by PressBook WordPress theme

%d