A computer in its simplest form comprises five functional units: the input unit, the output unit, the memory unit, the arithmetic & logic unit (ALU), and the control unit. Program execution involves the CPU fetching instructions sequentially one-by-one from the main memory. The CPU then decodes the instruction and performs the specified operation on associated data operands, typically in the ALU. The internal operation of the computer can be summarized as: Fetch, Decode, and Execute steps. An instruction generally consists of two parts: an Operation code (Opcode) and one or more operands. The Opcode specifies the operation to be performed, and the operands are the data or addresses associated with that operation. The Program Counter (PC) register keeps track of the execution of the program. It specifically holds the address of the next instruction to be read from memory after the current instruction is executed. Instruction words are read and executed in sequence unless a branch instruction is encountered. The ALU performs the actual computation or processing of data, containing necessary logic circuits (like adders and comparators) to perform operations such as addition, multiplication, and comparison. The Control Unit (CU) coordinates the activities of all units by issuing control signals. The CU also reads and interprets (decodes) the program instructions.
Be the first to comment