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
Related Questions in this Topic
- Explain the 'clock' component of CPU. How many bytes of data can be stored in a 16 GB pen drive ?
- How performance of a computer system is improved using a cache memory ? What are their advantages and disadvantages ?
- Explain various primary functions of CPU.
- Write short notes on the following: Video card and Network card
- Distinguish between the following: Mainframe computer and Micro computer