Harry Porter poses with the four wall mounted cabinets housing his fully functional hand built relay computer. source
Zuse inspired Harry who inspired me to build and run a simulator written in perl using character pattern matching for instruction decoding as my contribution to the craft. site
My simulator dispatched an instruction by first converting it to a string of characters and then subjecting that to a series of tests, one for each available instruction, expressed as pattern matches.
Here dot means either zero or one and parenthesis means we will use the field of matched bits in subsequent execution of the instruction. The capture reference, \1, indicates that the previous field must be repeated for the clear instruction, a special case of move.
goto clear_ if /00(...)\1/; goto move_ if /00(...)(...)/; goto set_8_ if /01(.)(.....)/; goto add_ if /1000(.)000/; goto inc_ if /1000(.)001/; goto and_ if /1000(.)010/; goto or_ if /1000(.)011/; goto xor_ if /1000(.)100/; goto not_ if /1000(.)101/; goto shift_ if /1000(.)110/; goto load_ if /10010.(..)/; goto store_ if /10011.(..)/; goto incxy_ if /10110000/; goto ret_ if /10100010/; goto halt_ if /10101110/; goto goto_ if /11100110/; goto call_ if /11100111/; goto branch_ if /111....0/; goto set_16_ if /11....../; die "bad op: $_\n";
This code concisely documents the instruction set architecture Harry chose for his machine.
See Konrad Zuse's Z1 for a design that predated the use of electricity at all, even for mechanical relays.
See James Newman's Megaprocessor, physically larger, built from seven planar floor standing racks, employing 15,300 discrete transistors for the cpu alone. site