Library

MTM · Recursively enumerable

4-tape ALU — add, and, or, xor, not

An arithmetic logic unit as a Turing machine: operands on tapes 1 and 2, the opcode on tape 3, the result on tape 4. Decode once, then one synchronized sweep per operation — the carry bit is the only state the machine ever needs.

decodecarry 0carry 1andorxornotdone
The machine as drawn — 8 states, 53 transitions.

The author’s examples, run

1101,0110,+,ε → accept1101,0110,&,ε → accept1101,0110,|,ε → accept1101,0110,^,ε → accept1101,ε,~,ε → accept