⚠️This site is a mirror of Guy Walker's Stagecast⚠️

Turing Trains | Isometric | Wang Tiles | Maze Arrays | i Logo

HOME

Turing Trains

 

computational train track layouts

menu

Add & Subtract

This straight forward layout shows how A can be added to or subtracted from register S by linking two similar circuits. The upper circuit is an adder and the lower acts as a subtractor.

If the value of S drops below 0 or rises above 31 then it is out of range and the train returns on a combined underflow/overflow error line.

Operation

Enter the values of A (and S if necessary). Start the train from the correct input line depending on whether you want to add or subtract A from S. When the train halts, the result can be read from register S.

If A is set to 1, then the circuit acts as a Count Up (increment) or a Count Down (decrement) function.

Train track layout to calculate A+B or A-B
add subtract
Click layout to pause/run train Click points to switch 0/1 Click start circle to reset train/points
lazy point Lazy points switch between upper 0 or lower 1 branch lines
Trains arriving on a branch line switch the point to that line
sprung point Sprung points allow branch line trains to join the main line
All main line trains go straight ahead and never 'branch off'

cr31.co.uk

 

zoom in to enlarge layouts