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.18.0 examples/add_one.stm
tins-1.17.0 examples/add_one.stm
tdiary-5.0.9 vendor/bundle/gems/tins-1.16.3/examples/add_one.stm
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/tins-1.16.3/examples/add_one.stm
tdiary-5.0.7 vendor/bundle/gems/tins-1.16.3/examples/add_one.stm
tins-1.16.3 examples/add_one.stm
tins-1.16.2 examples/add_one.stm
tins-1.16.1 examples/add_one.stm
tins-1.16.0 examples/add_one.stm
tins-1.15.1 examples/add_one.stm
tdiary-5.0.6 vendor/bundle/gems/tins-1.15.0/examples/add_one.stm
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/tins-1.6.0/examples/add_one.stm
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/tins-1.6.0/examples/add_one.stm
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/tins-1.6.0/examples/add_one.stm
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/tins-1.6.0/examples/add_one.stm
tins-1.15.0 examples/add_one.stm
tdiary-5.0.5 vendor/bundle/gems/tins-1.13.2/examples/add_one.stm
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/tins-1.13.2/examples/add_one.stm
tdiary-5.0.5 vendor/bundle/gems/tins-1.14.0/examples/add_one.stm
tins-1.14.0 examples/add_one.stm