Registers — The First Byte of Memory
RAM is relatively slow. Reading a byte from RAM takes multiple clock cycles — the address has to be placed on the bus, the memory chip has to decode it, find the data, and place it back on the bus. But the processor can't afford to wait that long for every operation. It needs super-fast storage right inside its core. That's what registers are.
A register is a group of D flip-flops (one per bit) sharing a common clock. An 8-bit register is simply 8 D flip-flops wired in parallel. On the clock edge, all 8 capture their D inputs simultaneously, and the Q outputs present the stored byte. Reading a register is virtually instantaneous — the data is already there, connected to internal wires.
Processors have multiple specialized registers: the accumulator (for ALU results), the program counter (for the next instruction address), the index register (for array access), the status register (for flags), and general-purpose registers for temporary data. A modern x86 processor has dozens of registers; the Ershov Computer keeps it minimal with just a handful.
Practical example. To add two numbers from RAM: first, LDA loads one number from RAM into the accumulator (slow RAM access). Then ADD loads the second number from RAM and adds it to the accumulator (second slow RAM access). But the sum stays in the accumulator — a register. If the next instruction also needs that sum, the processor reads it from the accumulator instantly, with zero delay. Registers are the cache of the CPU: keep frequently used data there, and your program runs faster.