User:Gelthor/sandbox: Difference between revisions

From Turing Complete
mNo edit summary
No edit summary
Line 1: Line 1:
{{guide|narrow=1}}
{{guide|narrow=1}}
<templatestyles src="Gelthor/test.css" />


'''Prerequisites: '''<br>
'''Prerequisites: '''<br>

Revision as of 19:49, 21 November 2023

Prerequisites:
Make sure you completed The Maze level. I also use KV diagrams later on, so you might check out this guide before: K-map

The idea - what is a state machine?

Imagine you have to build a circuit to control some kind of device. You don't have a full computer - only basic gates, and need to come up with a solution, so that your device behave the way you want it to.

The idea is, that we go over all possible things that our device can do step-by-step. We draw a circle for each of those steps and call it a state. Usually every possible output that our device can have has at least one state. We then connect this circles by arrows that have a certain condition assigned to it (called transitions). These conditions are usually a specific configuration of input signals (What shall the device do when certain inputs arrive).

This means something like that:
We go from state A to state B, when the condition on the arrow from A to B is met.

By doing so, we can construct a picture where the complete behaviour is visible for us and we can understand it easily (= state machine). The cool thing is: There is a completely deterministic way to convert this pictures to circuits by following a few steps, and your device will do exactly what you specified in the picture. It is so straight forward, that you can technically write a program that converts state machines to circuits.

Tables

means
Free
Wall
Door
Always (we don't care about the value of the input)
means
Free
Wall
Door
Always (we don't care about the value of the input)