# Tape Reader demo - Codd's CA
#
# In this demo, a stack of coders is repeatedly triggered. The coded
# sequence is 4666,76,5546,77,7,46. The first four sets are the commands
# retract-right, extend, extend_right, and sense. These cause the tape
# head to advance one square and to read the tape cell at that position.
# An echo signal bounces back: either 6 or 7 depending whether the
# tape cell was 0 or 1. To keep this demo simple we just delete the echo
# by colliding a 7 signal with it. The final 46 then caps the end of
# the read head that was exposed for sensing, and the process can repeat.
#
# In Codd's design for a self-replicating machine the echo signal would 
# instead be passed as output. See echo-discriminator-demo.rle for a demo 
# that shows how the echo can be used.
#
# Within each coder, three gates are required. Two ensure that the 
# outputs flow in the right direction, the third is to make sure that
# the first two aren't turned off by later signals.
#
x = 104, y = 162, rule = Codd
.19B$B16A.F9A20.24A$BA10BA7B7.A20.A22.A$BAB8.BAB13.A20.A$BAB8.BAB13.A
20.A23.A.A.2A2.3A2.2A2.A2.A.3A.A3.2A$BAB8.BAB13.19A2.A$BAB8.BAB13.A3.
A2.A7.A5.A$BAB8.BAB13.A3.A2.A7.A5.A$BAB8.BAB13.A3.4A4.A2.4A2.A$BAB8.B
AB13.A6.A4.4A2.A2.A$BAB8.BAB13.A6.A13.A$BAB8.BAB13.A6.A13.A$BAB8.BAB
13.A6.15A$BAB8.BAB13.A20.A$BAB8.BAB13.A20.A$BAB8.BAB13.19A2.A$BAB8.BA
B13.A2.A.A9.A5.A$BAB8.BAB13.A2.3A9.A5.A$BAB8.BAB13.A4.3A4.A2.4A2.A$BA
B8.BAB13.A4.A.A4.4A2.A2.A$BAB8.BAB13.A4.6A10.A$BAB8.BAB13.A7.A.A10.A$
BAB8.BAB13.A7.14A$BAB8.BAB13.A20.A$BAB8.BAB13.A20.A$BAB8.BAB13.19A2.A
$BAB8.BAB13.A2.A.A9.A5.A$BAB8.BAB13.A2.3A9.A5.A$BAB8.BAB13.A4.3A4.A2.
4A2.A$BAB8.BAB13.A4.A.A4.4A2.A2.A$BAB8.BAB13.A4.6A10.A$BAB8.BAB13.A7.
A.A10.A$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