Explain various primary functions of CPU.

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

Answer & Explanation:

Functions of Central Processing unit A CPU has four primary functions: fetch, decode, execute, and write back. A. Fetch: In the first step, the CPU retrieves the instruction that it needs to run from program memory. Each instruction in a program (which contains millions of instructions) is stored at a specific address. The CPU has a program counter, which keeps track of the CPU's position in the program more specifically, the address of the instruction that the CPU is accessing. B. Decode: For this step, it's important to know that no matter what code a program is written in, the compiler for that specific language breaks the code down to Assembly Language. Assembly language is a language that the CPU understands, but may vary between different CPUs. From there on, an 'assembler' translates Assembly Language into binary code, which the CPU can manipulate to execute the instructions it is given. C. Execute: Based on the instructions it is given, the CPU can then do one of three things: (1) Using its Arithmetic Logic Unit (ALU), the CPU can calculate extremely complicated 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 of the actions taken by the CPU produces some sort of output. The CPU takes this output and writes it into the computer's memory. When these four steps have been completed, the Program Counter moves onto the next instruction and repeats the entire process again, until the termination of the program.

Topics: Computer Hardware

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

Related Questions in this Topic