Explain various functions of CPU.

CS Professional · Information Technology and Systems Audit · PYQS · December 2017
Explain various functions of CPU.

Answer & Explanation:

A CPU has four primary functions: fetch, decode, execute, and write back. A. FETCH: In this first step, the CPU retrieves the instruction it needs to run from program memory. Each instruction is stored at a specific address, and the CPU's program counter tracks the address of the instruction currently being accessed. B. DECODE: Regardless of the programming language, a compiler breaks code down into Assembly Language, which the CPU understands (though it may vary between CPUs). An 'assembler' then translates Assembly Language into binary code, which the CPU manipulates to execute instructions. C. EXECUTE: Based on the given instructions, the CPU can perform one of three actions: (1) Use its Arithmetic Logic Unit (ALU) to calculate complex mathematical functions. (2) Move data from one memory location to another. (3) Jump to different addresses in the program based on decisions made by the CPU itself. D. WRITE BACK: Typically, each CPU action produces some output. The CPU takes this output and writes it into the computer's memory. For example, if the CPU executes an addition of 3 and 5, the result (8) is written back to a specific memory address. For jump instructions, the program counter simply updates to reflect the start of the next set of instructions.

Topics: Computer Hardware

Open in Interactive Practice Hub · Full Practice Hub · Chapter Weightage · More in this subject

Related Questions in this Topic