As noted above, the ALU needs other components as well:
– Registers to store arguments and results.
– Buses to carry data from registers to the ALU and results back to the register unit.
– Two memory access units, with associated buses:
An instruction fetch unit to get instructions from computer memory as needed. This includes a program counter, which always points to the address of the next instruction to be accessed.
A second path to memory to obtain data to be used in the program and to store data back into memory as required.
– A control unit that tells the ALU what to do (covered later).
The program counter (PC) is a register that addresses the instruction in next memory.
Since the PC always points to the “next instruction,” this address must be readily updated.
The usual method is to add 4 the to current address (since the instruction is a 32-bit word and each 32-bit word has an address 4 bytes higher than the last word).