Skip to content

Instantly share code, notes, and snippets.

View prayansh's full-sized avatar

Prayansh Srivastava prayansh

View GitHub Profile
@prayansh
prayansh / StringDoubler.yaml
Last active April 2, 2019 18:36
Turing Machine to double a string containing the alphabet [A,B,0] accessible via http://turingmachine.ioturingmachine.io/?import-gist=f178efe88f5e64dd431c596b3a69bd39
name: StringDoubler
source code: |
# Adds 1 to a binary number.
input: 'ABBA00000000000000'
blank: ' '
start state: q0
table:
# scan to the rightmost digit
q0:
A : {write: 0, R: q1}