Processor Work
Processor Work

Making the Processor Work

We communicate with computers by telling them what to do in their native tongue— the machine language.

THE MACHINE LANGUAGE

You may have heard of computer programming languages such as Visual BASIC and C+ + . There are dozens of these languages in common usage, all of which need to be translated into the only language that a computer understands—its own machine language. Can you guess how machine-language instructions are represented inside the computer? You are correct if you answered as strings of binary digits.

THE MACHINE CYCLE: MAKING THE ROUNDS

Every computer has a machine cycle. The speed of a processor is sometimes measured by how long it takes to complete a machine cycle. The timed interval that comprises the machine cycle is the total of the instruction time, or I-time, and the execution time, or E-time (see Figure 2-6). The following actions take place during the machine cycle

                                                     Instruction time

• Fetch instruction. The next machine-language instruction to be executed is retrieved, or "fetched," from RAM or cache memory and loaded to the instruction register in the control unit.
• Decode instruction. The instruction is decoded and interpreted.

Execution time

• Execute instruction. Using whatever processor resources are needed (primarily the arithmetic and logic unit), the instruction is executed.
• Place result in memory. The results are placed in the appropriate memory position or the accumulator.