<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Engineersphere.com &#187; Kyle</title>
	<atom:link href="http://engineersphere.com/author/kyle/feed" rel="self" type="application/rss+xml" />
	<link>http://engineersphere.com</link>
	<description>doesn&#039;t have to make sense to you, but it&#039;s probably great for your health.</description>
	<lastBuildDate>Fri, 28 Oct 2011 03:05:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Finite State Machines</title>
		<link>http://engineersphere.com/basic-computer-concepts/finite-state-machines.html</link>
		<comments>http://engineersphere.com/basic-computer-concepts/finite-state-machines.html#comments</comments>
		<pubDate>Thu, 10 Sep 2009 04:01:00 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Basic Computer Engineering Concepts]]></category>
		<category><![CDATA[Control Systems]]></category>
		<category><![CDATA[Electromagnetic Theory]]></category>
		<category><![CDATA[Finite state machines]]></category>
		<category><![CDATA[mealy machines]]></category>
		<category><![CDATA[moore machines]]></category>
		<category><![CDATA[state machines]]></category>

		<guid isPermaLink="false">http://engineersphere.com/?p=808</guid>
		<description><![CDATA[TweetTweetA Finite State Machine (FSM), or just state machine, is a model of behavior composed of a finite number of states. We use these in computer engineering to model a &#8220;machine&#8221; with primitive memory. Based on the signals  we recieve, we go to a certain state where information is processed, and then we wait for [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://engineersphere.com/basic-computer-concepts/finite-state-machines.html&via=EngineerSphere&text=Finite State Machines&related=EngineerSphere:&lang=en&count=none" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://engineersphere.com/basic-computer-concepts/finite-state-machines.html&via=EngineerSphere&text=Finite State Machines&related=EngineerSphere:&lang=en&count=none" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><p>A Finite State Machine (FSM), or just state machine, is a model of behavior composed of a finite number of states. We use these in computer engineering to model a &#8220;machine&#8221; with primitive memory. Based on the signals  we recieve, we go to a certain state where information is processed, and then we wait for the signal that indicates we move to the next state.  There are two types of FSMs we will talk about: Moore machines and Mealy machines.</p>
<h3>Moore Machines</h3>
<p>Moore machines are state machines where the output is determined by only the current state, not the inputs. For example, if we  had designed a system where the state table looks like this:</p>
<table style="border-collapse: collapse; width: 207pt;" border="0" cellspacing="0" cellpadding="0" width="276">
<col style="width: 88pt;" width="117"></col>
<col style="width: 71pt;" width="95"></col>
<col style="width: 48pt;" width="64"></col>
<tbody>
<tr style="height: 18.75pt;" height="25">
<td style="height: 18.75pt; width: 88pt;" width="117" height="25">Current   State</td>
<td style="width: 71pt;" width="95">Next State</td>
<td style="width: 48pt;" width="64">Input</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">00</td>
<td>01</td>
<td>XX</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">01</td>
<td>10</td>
<td>XX</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">10</td>
<td>11</td>
<td>XX</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">11</td>
<td>00</td>
<td>XX</td>
</tr>
</tbody>
</table>
<p><tt></tt></p>
<p>we can see that it doesn&#8217;t even matter what the input and outputs are, the next state only depends on the current state. A typical example of Moore style state machines is a synchronous circuit composed of flip-flops connected to a clock. The state can only change when the clock pulses, and for flip-flops, the output(next state) is a function of the input(current state).</p>
<h3>Mealy Machines</h3>
<p>By contrast there are FSMs called Mealy machines where the next state is a function of both the current state, and the input.</p>
<p>Consider the truth table we discussed earler. In our Moore state machine design, we didn&#8217;t care what the input was. Now, however, we have decided that if the current state is 00 and the input is 0 , the next state is 01 .</p>
<table style="border-collapse: collapse; width: 207pt;" border="0" cellspacing="0" cellpadding="0" width="276">
<col style="width: 88pt;" width="117"></col>
<col style="width: 71pt;" width="95"></col>
<col style="width: 48pt;" width="64"></col>
<tbody>
<tr style="height: 18.75pt;" height="25">
<td style="height: 18.75pt; width: 88pt;" width="117" height="25">Current   State</td>
<td style="width: 71pt;" width="95">Next State</td>
<td style="width: 48pt;" width="64">Input</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">00</td>
<td>01</td>
<td>0</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">00</td>
<td>01</td>
<td>1</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">01</td>
<td>10</td>
<td>0</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">01</td>
<td>10</td>
<td>1</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">10</td>
<td>11</td>
<td>0</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">10</td>
<td>11</td>
<td>1</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">11</td>
<td>00</td>
<td>0</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20">11</td>
<td>00</td>
<td>1</td>
</tr>
</tbody>
</table>
<p>We can see above that the next state is a function of the current state, and the input. A real world example of a  Mealy machine is a mathematical cypher machine.</p>
<p>Mealy machines are typically sequential logic, whereas Moore machines are combinatorial logic.</p>
]]></content:encoded>
			<wfw:commentRss>http://engineersphere.com/basic-computer-concepts/finite-state-machines.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

