Created
October 24, 2020 03:19
-
-
Save Silva97/c8653e6dcb3d85fdd553544fa2a1fca9 to your computer and use it in GitHub Desktop.
Turing Machine code for sum numbers | Just a test :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sum - Silva97 | |
source code: |- | |
input: '0010+0011' | |
blank: ' ' | |
start state: look | |
table: | |
left4: | |
0: {L: left3} | |
1: {L: left3} | |
'+': {L: left3} | |
left3: | |
0: {L: left2} | |
1: {L: left2} | |
'+': {L: left2} | |
left2: | |
0: {L: left1} | |
1: {L: left1} | |
'+': {L: left1} | |
left1: | |
0: {L: increment} | |
1: {L: increment} | |
'+': {L: increment} | |
sum: | |
0: {write: ' ', L} | |
1: {write: ' ', L: left4} | |
'+': {write: ' ', L: done} | |
increment: | |
0: {write: 1, R: look} | |
1: {write: 0, L: carry} | |
carry: | |
0: {write: 1, R: look} | |
1: {write: 0, L} | |
' ': {write: 1, R: look} | |
look: | |
0: R | |
1: R | |
'+': R | |
' ': {write: ' ', L: sum} | |
done: | |
positions: | |
left4: {x: 520.42, y: 379.07, fixed: false} | |
left3: {x: 386.36, y: 433.68, fixed: false} | |
left2: {x: 257.47, y: 366.21, fixed: false} | |
left1: {x: 217.98, y: 225.09, fixed: false} | |
sum: {x: 535.83, y: 236.09, fixed: false} | |
increment: {x: 304.15, y: 107.17, fixed: false} | |
carry: {x: 366.97, y: 234.73, fixed: false} | |
look: {x: 448.04, y: 118.75, fixed: false} | |
done: {x: 602.23, y: 112.03, fixed: false} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment