After playing this game for a while it became clear that the signals are very powerful. Which led me to wonder whether it is possible to build all logical gates in openTTD using only trains and signals. From there on it went downhill. The attached save game is the same save game I posted previously, but now with lots of comments.Overview of the logic gates
In the system a green sign represents a value of 1 and a red sign represents a value of 0.
The OR gate is trivial:
OR.PNG [ 19.74 KiB | Viewed 14055 times ]
The AND gate is not quite so simple. When the first train stops before the sign near Bit I or Bit 2 the presignals send the second train through the checkpoint. This turns the output to red. If both Bit I and II are green the trains will never go through the checkpoint.
NOT.PNG [ 23.1 KiB | Viewed 14069 times ]
The NOT gate was the hardest. By using a combination of presignals and standard signals it was possible to keep one piece of track occupied continuously if the input is green.
The attachment OR.PNG is no longer available
The memory is simple in itself. However because the system does not use a clock-pulse it became more complex. To work around this problem the memory stores it's state internally before the output is updated. Hence two trains for each bit.
The other parts of the system are large combinations of ORs to convert binary numbers to decimal and to update the LED display on basis of the decimal value.