back

by peter_d_sherman·9y ago·view on hn ↗
A CPU's registers is where all of the "bit transformation" (adding, subtracting, multiplying, dividing, branching) work that Computers do, is done. Registers are like very small scratchpads, typically 32 or 64 bits (or 4 bytes/8 bytes) wide. Computers with as little as one main register for calculation, and another register for which instruction in memory is executing (instruction pointer) are possible. CPU's as low as 4 bits have existed (Intel 4004), although there's no reason electronically a CPU could use less bits than that (well, in order to execute a program, you need an address in memory, and for that you need more bits for larger addresses, i.e., more memory). Every electronic calculator from the 1970's is a computer IF it had memory, conditional instructions (if results of last calculation were greater than zero, go to (change instruction pointer) to this new address, otherwise, continue with next instruction. MOV AX, BX is an abstraction for programmer consumption only, a CPU's basic instructions are something like: 1) Move value into accumulator (AX, R1 or EAX or RAX or R1 or Reg1) from somewhere in memory. 2) Perform some sort of calulation on it (Add, Subtract, Multiply, Divide, Bit Shift, And, Or, etc.) 3) Store it back to memory 4) Execute a conditional branch instruction which says, as a result of the last mathematical computation, either a) jump to a new address (bypass a section of code), or b) continue with the next instruction.

The Zuse Z3 is probably the simplest Turing-Complete computer that was ever invented (in 1941 no less!); I'd start there:

https://en.wikipedia.org/wiki/Z3_(computer)

1 comments
The Z3 is a floating point machine... I'd wager that it is more complex than the 4004. While the 4004 has a couple more transistors than the Z3 had relays (about 600 in the "CPU"), the telephone relays used by the Z3 had many circuits and thus can perform more complex stuff than a single transistor in a logic circuit.