Sha256: 37807b7f22eb92ba96f1b9fbb11df4530b9fe752e04873a07f8c0817c22c3032

Contents?: true

Size: 385 Bytes

Versions: 135

Compression:

Stored size: 385 Bytes

Contents

# vim: ts=2 sw=2 et ft=ruby
# Call with a binary number on the tape:
# $ turing.rb add_one.stm 1111010101

0. right :goto   => 1
1. cond  :if => 'B', :then => 2, :else => 0
2. left  :goto   => 3
3. cond  :if => '1', :then => 4, :else => 5
4. write :symbol => '0', :goto => 2
5. write :symbol => '1', :goto => 6
6. right :goto   => 7
7. cond  :if => 'B', :then => 8, :else => 6
8. halt

Version data entries

135 entries across 121 versions & 9 rubygems

Version Path
tins-1.38.0 examples/add_one.stm
tins-1.37.1 examples/add_one.stm
tins-1.37.0 examples/add_one.stm
tins-1.36.1 examples/add_one.stm
tins-1.36.0 examples/add_one.stm
tins-1.35.0 examples/add_one.stm
tins-1.34.0 examples/add_one.stm
tins-1.33.0 examples/add_one.stm
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/examples/add_one.stm
tins-1.32.1 examples/add_one.stm
tins-1.32.0 examples/add_one.stm
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/examples/add_one.stm
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/examples/add_one.stm
tins-1.31.1 examples/add_one.stm
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/tins-1.31.0/examples/add_one.stm
tins-1.31.0 examples/add_one.stm
tins-1.30.0 examples/add_one.stm
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/examples/add_one.stm
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/tins-1.29.1/examples/add_one.stm
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/examples/add_one.stm