{"id":6461,"date":"2022-01-11T10:33:51","date_gmt":"2022-01-11T10:33:51","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=6461"},"modified":"2023-05-27T13:58:39","modified_gmt":"2023-05-27T08:28:39","slug":"mealy-and-moore-machine","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/","title":{"rendered":"FSM Lecture 2- Mealy and Moore machine"},"content":{"rendered":"<div class=\"boldgrid-section\" style=\"background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 35px; padding-bottom: 0px; background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"col-md-1 col-sm-12 col-xs-12 col-lg-1\">\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"col-md-10 col-sm-12 col-xs-12 col-lg-10\">\n<h1 class=\"\" style=\"text-align: center; font-size: 30px; border-width: 0px; line-height: 50px;\"><span style=\"color: #000080;\"><b>Mealy and Moore machine<\/b><\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\" style=\"border-width: 0px; margin-top: -25px;\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<p>&nbsp;<\/p>\n<div class=\"bg-hr bg-hr-10 color2-color\" style=\"border-style: solid; border-width: 0px 0px 3px;\"><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">Mealy and Moore machines are two different types of Finite State Machines (FSMs) that are commonly used for modeling and designing digital systems. Both types of machines define the behavior and state transitions of a system, but they differ in how they handle outputs.<\/span><\/p>\n<p class=\"\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 25px; border-width: 0px; line-height: 37px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><b>Mealy machine:<\/b><\/span><\/p>\n<ul class=\"\" style=\"border-width: 0px; font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">In this machine, the output produced by the state machine depends on the input events fed to the state machine AND presents an active state of the state machine.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">The output is not produced inside the state.<\/span><\/li>\n<\/ul>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">Here are the key characteristics of a Mealy machine:<\/span><\/p>\n<ul class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li><span style=\"color: #000000;\">Outputs depend on the current state and the inputs.<\/span><\/li>\n<li><span style=\"color: #000000;\">Outputs can change asynchronously during the state.<\/span><\/li>\n<li><span style=\"color: #000000;\">The output is associated with the transitions between states.<\/span><\/li>\n<\/ul>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">A Mealy machine can be represented by a state diagram or a state table. The state diagram consists of circles (representing states) and arrows (representing transitions), where each transition is labeled with both the triggering input and the associated output.<\/span><\/p>\n<figure id=\"attachment_6463\" aria-describedby=\"caption-attachment-6463\" style=\"width: 643px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-6463\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/01\/Figure-1.png\" alt=\"Mealy and Moore machine\" width=\"643\" height=\"354\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1.png 797w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1-300x165.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1-768x422.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1-600x330.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1-120x66.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1-500x275.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1-200x110.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1-400x220.png 400w\" sizes=\"(max-width: 643px) 100vw, 643px\" \/><figcaption id=\"caption-attachment-6463\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Generic model of the Mealy machine.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Figure 1 shows the Generic model of the Mealy machine.<\/span><\/p>\n<ul class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">In the Mealy machine, the output is represented along with each input separated by a \u2018\/\u2019 character.&nbsp;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">An \u2018Output\u2019 is also called \u2018Actions.\u2019<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">In the Mealy model, the \u2018Output\u2019 is also called \u2018Input action.\u2019 Because when the input is received, the action may happen or output happens, and there will be a state transition.<\/span><\/li>\n<\/ul>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">That\u2019s why, in the mealy machine, all you need to remember is, the output is not produced inside the states but along the transition.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 25px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 35px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><b>Example of Mealy Machine:<\/b><\/span><\/p>\n<figure id=\"attachment_6464\" aria-describedby=\"caption-attachment-6464\" style=\"width: 684px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-6464 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/01\/Figure-2.png\" alt=\"Mealy and Moore machine\" width=\"684\" height=\"385\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2.png 1280w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-300x169.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-768x432.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-1024x576.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-600x338.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-120x68.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-500x281.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-200x113.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-400x225.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-800x450.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-2-1200x675.png 1200w\" sizes=\"(max-width: 684px) 100vw, 684px\" \/><figcaption id=\"caption-attachment-6464\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Mealy machine Example<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">A light control application has 4 states.&nbsp;<\/span><\/p>\n<ol class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Off state&nbsp;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">the dim state&nbsp;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">medium brightness state&nbsp;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Full brightness state<\/span><\/li>\n<\/ol>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">A state can be drawn as a circle, or as a rectangle, or as a rounded rectangle; it doesn&#8217;t matter. You can draw it in any way you want. But, if it is a UML specification-based state machine diagram, it should be a curved rectangle.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">But, if you are modeling your application using different states, you can either use a circle or a rectangle, no problem.&nbsp;<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6465\" aria-describedby=\"caption-attachment-6465\" style=\"width: 742px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-6465 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/01\/Figure-3.png\" alt=\"Mealy and Moore machine\" width=\"742\" height=\"418\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3.png 1920w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-300x169.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-768x432.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-1024x576.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-600x338.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-120x68.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-500x281.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-200x113.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-400x225.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-800x450.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-3-1200x675.png 1200w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><figcaption id=\"caption-attachment-6465\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Event move to the Initial state to Dim state<\/span><\/figcaption><\/figure>\n<p data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400;\"><span style=\"color: #000000;\">In Figure 3, there are two buttons on the light stand, the ON button and the OFF button.&nbsp;<\/span>&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">When you give power to the table lamp, initially, the application will be in the &#8216;OFF&#8217; state. The &#8216;ON&#8217; event is delivered to the state machine when you press the&#8217; ON&#8217; button. That&#8217;s an &#8216;ON&#8217; event. When you press the &#8216;OFF&#8217; button, the &#8216;OFF&#8217; event is delivered to the state machine.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">As I said, when you first give the power, the table lamp software gets into the initial state &#8216;OFF .&#8217; When you press the &#8216;ON&#8217; button, the &#8216;ON&#8217; event is delivered to the software, making a transition. The state of the software will be changed to &#8216;Dim,&#8217; and along with this transition it produces the output &#8216;Dim the light.&#8217; So, the light will be turned &#8216;ON,&#8217; but its intensity will be &#8216;Dim.&#8217;<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6466\" aria-describedby=\"caption-attachment-6466\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6466 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/01\/Figure-4.png\" alt=\" Mealy and Moore machine\" width=\"675\" height=\"380\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4.png 1920w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-300x169.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-768x432.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-1024x576.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-600x338.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-120x68.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-500x281.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-200x113.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-400x225.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-800x450.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-4-1200x675.png 1200w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><figcaption id=\"caption-attachment-6466\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. Event move to the Dim state to Medium brightness state<\/span><\/figcaption><\/figure>\n<p data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now the software is in the \u2018Dim\u2019 state, and when it gets into the \u2018Dim\u2019 state, it doesn\u2019t do anything in the Mealy machine; it just waits in the \u2018Dim\u2019 state. When you again press the \u2018ON\u2019 button one more time, the state machine receives the \u2018ON\u2019 event, and the state machine moves from \u2018Dim\u2019 state to \u2018Medium brightness\u2019 state, producing the output \u2018Medium brightness .\u2019(Figure 4)<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6467\" aria-describedby=\"caption-attachment-6467\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6467 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/01\/Figure-5.png\" alt=\"Figure 5. Move event to the medium brightness to Full brightness\" width=\"675\" height=\"380\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5.png 1920w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-300x169.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-768x432.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-1024x576.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-600x338.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-120x68.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-500x281.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-200x113.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-400x225.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-800x450.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-5-1200x675.png 1200w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><figcaption id=\"caption-attachment-6467\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. Event move to the medium brightness to Full brightness<\/span><\/figcaption><\/figure>\n<p data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now the software is in \u2018Medium brightness\u2019 state, and again you press the \u2018ON\u2019 button, it receives the ON event and produces some other output. (Figure 5)<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6468\" aria-describedby=\"caption-attachment-6468\" style=\"width: 693px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6468 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/01\/Figure-6.png\" alt=\"Figure 6\" width=\"693\" height=\"390\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6.png 1920w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-300x169.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-768x432.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-1024x576.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-600x338.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-120x68.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-500x281.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-200x113.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-400x225.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-800x450.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-6-1200x675.png 1200w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><figcaption id=\"caption-attachment-6468\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. Event move to the any of the state to OFF state<\/span><\/figcaption><\/figure>\n<p data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">When the state machine is in any of the states, when the user presses the \u2018OFF\u2019 button, the OFF event is received, and they go back to the OFF state, and along with the transition the action taken was \u2018Lights Off.\u2019 (Figure 6)<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 25px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 35px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><b>Moore Machine:<\/b><\/span><\/p>\n<ul class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">In this state machine, the output is determined only by the present active state of the state machine and not by any input events.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">No output during state transition.<\/span><\/li>\n<\/ul>\n<figure id=\"attachment_6469\" aria-describedby=\"caption-attachment-6469\" style=\"width: 647px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6469 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/01\/Figure-7.png\" alt=\"Figure 7.Generic Moore model\" width=\"647\" height=\"279\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-7.png 703w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-7-300x129.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-7-600x259.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-7-120x52.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-7-500x216.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-7-700x303.png 700w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-7-200x86.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-7-400x172.png 400w\" sizes=\"(max-width: 647px) 100vw, 647px\" \/><figcaption id=\"caption-attachment-6469\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 7.Generic Moore model<\/span><\/figcaption><\/figure>\n<ul class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Output is represented inside the state.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">\u2018Output\u2019 is also called&nbsp; \u2018Action.\u2019<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">In the Moore model, the \u2018Output\u2019 is also called \u2018Entry action.\u2019<\/span><\/li>\n<\/ul>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">Here are the key characteristics of a Moore machine:<\/span><\/p>\n<ul class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li><span style=\"color: #000000;\">Outputs depend only on the current state.<\/span><\/li>\n<li><span style=\"color: #000000;\">Outputs change synchronously at the beginning of each state.<\/span><\/li>\n<li><span style=\"color: #000000;\">The output is associated with the states.<\/span><\/li>\n<\/ul>\n<p class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">A Moore machine can also be represented by a state diagram or a state table. The state diagram consists of circles (representing states) and arrows (representing transitions), where the outputs are typically written inside the circles representing the states.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 25px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 35px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><strong><span style=\"text-decoration: underline;\">Moore Machine Example:<\/span><\/strong><\/span><\/p>\n<figure id=\"attachment_6470\" aria-describedby=\"caption-attachment-6470\" style=\"width: 675px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6470 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/01\/Figure-8.png\" alt=\"Figure 8. Moore machine Example\" width=\"675\" height=\"380\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8.png 1920w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-300x169.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-768x432.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-1024x576.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-600x338.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-120x68.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-500x281.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-200x113.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-400x225.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-800x450.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-8-1200x675.png 1200w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><figcaption id=\"caption-attachment-6470\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 8. Moore machine Example<\/span><\/figcaption><\/figure>\n<p data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">When the initial state is \u2018OFF\u2019 or when the initial state \u2018OFF\u2019 is entered, the entry action gets executed, or the output is produced. That is \u2018Lights Off .\u2019<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">And when the user presses the \u2018ON\u2019 button, the state machine receives the \u2018ON\u2019 event, and when the state machine receives the \u2018ON\u2019 event, it moves to the \u2018Dim\u2019 state, or it enters the \u2018Dim\u2019 state. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">And when it enters the \u2018Dim\u2019 state, the entry action gets executed. That is \u2018Dim the Light.\u2019<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The Mealy and Moore machines are not quite famous in software engineering to model your software engineering problems, but it is still being used. Its application areas are digital circuit designs, the VLSI system design, etc.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">In the following article, let&#8217;s learn <span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"http:\/\/fastbitlab.com\/fsm-lecture-3-mealy-and-moore-state-transition-table\/\" target=\"_blank\" rel=\"noopener\">Mealy and Moore State Transition Table<\/a><\/span>.<\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 20px; line-height: 28px;\"><span style=\"color: #000080;\"><b>FastBit Embedded Brain Academy Courses<\/b><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 17px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">C<span style=\"font-weight: 400;\">lick here:&nbsp;<\/span><\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff; text-decoration: underline;\" href=\"http:\/\/fastbitlab.com\/course1\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/fastbitlab.com\/course1<\/span><\/a><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Mealy and Moore machine &nbsp; &nbsp; Mealy and Moore machines are two different types of Finite State Machines (FSMs) that are commonly used for modeling and designing digital systems. Both types of machines define the behavior and state transitions of a system, but they differ in how they handle outputs. &nbsp; Mealy machine: In [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6463,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"enable","ocean_disable_heading":"default","ocean_post_title":"Mealy and Moore machine","ocean_post_subheading":"","ocean_post_title_style":"solid-color","ocean_post_title_background_color":"#00b7a8","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[8],"tags":[17],"class_list":["post-6461","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-finite-state-machine","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mealy and Moore machine- Generic model and Examples | FSM<\/title>\n<meta name=\"description\" content=\"Finite state machine(FSM) - Mealy and Moore machine. In Mealy machine, the output produced by the state machine depends on the input events\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mealy and Moore machine- Generic model and Examples | FSM\" \/>\n<meta property=\"og:description\" content=\"Finite state machine(FSM) - Mealy and Moore machine. In Mealy machine, the output produced by the state machine depends on the input events\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-11T10:33:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-27T08:28:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"797\" \/>\n\t<meta property=\"og:image:height\" content=\"438\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"FSM Lecture 2- Mealy and Moore machine\",\"datePublished\":\"2022-01-11T10:33:51+00:00\",\"dateModified\":\"2023-05-27T08:28:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/\"},\"wordCount\":1040,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/Figure-1.png\",\"keywords\":[\"Finite state Machine(FSM)\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/\",\"name\":\"Mealy and Moore machine- Generic model and Examples | FSM\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/Figure-1.png\",\"datePublished\":\"2022-01-11T10:33:51+00:00\",\"dateModified\":\"2023-05-27T08:28:39+00:00\",\"description\":\"Finite state machine(FSM) - Mealy and Moore machine. In Mealy machine, the output produced by the state machine depends on the input events\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/Figure-1.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/Figure-1.png\",\"width\":797,\"height\":438},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/mealy-and-moore-machine\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FSM Lecture 2- Mealy and Moore machine\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mealy and Moore machine- Generic model and Examples | FSM","description":"Finite state machine(FSM) - Mealy and Moore machine. In Mealy machine, the output produced by the state machine depends on the input events","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/","og_locale":"en_US","og_type":"article","og_title":"Mealy and Moore machine- Generic model and Examples | FSM","og_description":"Finite state machine(FSM) - Mealy and Moore machine. In Mealy machine, the output produced by the state machine depends on the input events","og_url":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2022-01-11T10:33:51+00:00","article_modified_time":"2023-05-27T08:28:39+00:00","og_image":[{"width":797,"height":438,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"FSM Lecture 2- Mealy and Moore machine","datePublished":"2022-01-11T10:33:51+00:00","dateModified":"2023-05-27T08:28:39+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/"},"wordCount":1040,"commentCount":7,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1.png","keywords":["Finite state Machine(FSM)"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/","url":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/","name":"Mealy and Moore machine- Generic model and Examples | FSM","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1.png","datePublished":"2022-01-11T10:33:51+00:00","dateModified":"2023-05-27T08:28:39+00:00","description":"Finite state machine(FSM) - Mealy and Moore machine. In Mealy machine, the output produced by the state machine depends on the input events","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/01\/Figure-1.png","width":797,"height":438},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/mealy-and-moore-machine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FSM Lecture 2- Mealy and Moore machine"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/6461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/comments?post=6461"}],"version-history":[{"count":4,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/6461\/revisions"}],"predecessor-version":[{"id":14806,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/6461\/revisions\/14806"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/6463"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=6461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=6461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=6461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}