Understanding Automotive Electronics, Sixth Edition

To understand how the computer performs a branch, one must first understand how the computer reads program instructions from memory. Recall that program instructions are stored sequentially (step by step) in memory as binary numbers, starting at a certain binary address and ending at some higher address. The computer uses a register called the program counter (Figure 4.4) to keep track of where it is in the program.
The first step in starting up a computer is initialization.
To start the computer, a small startup (boot) program that is permanently stored in the computer is run. This program sets all of the CPU registers with the correct values and clears all information in the computer memory to zeros before the operations program is loaded. This is called initializing the system. Then, the operations program is loaded into memory, at which point the address of the first program instruction is loaded into the program counter. The first instruction is read from the memory location whose address is contained in the program counter register; that is, the 16 bits in the program counter are used as the address for a memory read operation. Each instruction is read from memory in sequence and set on the data bus into the instruction register, where it is decoded. The instruction register is another temporary storage register inside the CPU (or microprocessor). It is connected to the data bus when the information on the bus is an instruction.
The actual...