Skip to content
TheCScience
The Computer Science

Everything About Computer & Science

  • Pages
    • About US
    • Contact US
    • Privacy Policy
    • DMCA
  • Human values
  • NCERT SOLUTIONS
    • Class 12
    • Class 11
  • HackerRank solutions
    • HackerRank Algorithms Problems Solutions
    • HackerRank C solutions
    • HackerRank C++ problems solutions
    • HackerRank Java problems solutions
    • HackerRank Python problems solutions
TheCScience
The Computer Science

Everything About Computer & Science

Basic Function of Computer | Computer Architecture

YASH PAL, November 22, 2025November 22, 2025

The basic function performed by a computer is execution of a program, which consists of a set of instruction stored in memory. The central processing unit (CPU) is an unit of computer which performs a variety of functions given by that instructions.

In the simplest way, instruction processing consists of two steps:

  1. The processor reads instructions from memory one at a time and
  2. Executes each instruction. Reading and executing an instruction may involve several operations and this depends on the meaning of that instruction. In general, program execution is therefore carried out as follows:
    1. The central processing unit (CPU) moves the instruction and input data (if necessary) from main memory to the interal registers of CPU.
    2. Decode and execute the instructions in their stored sequence. However, the execution sequence may change in presence of interrupt or branching instruction.
    3. Transfers the output data, if any, from the CPU registers to the main memory.

The above three steps, for program execution, are shown in below figure. The program starts with reading (fetching) and then executing the instructions. The program execution stops only if the machine is turned off, an error occurs or a program instruction that stops the execution is encountered.

Basic execution of a program
Basic execution of a program

The processing required for a single instruction is called as instruction cycle. Each instruction cycle begins with the reading operation of an instruction from memory. This is called fetch operation. The program counter (PC) register holds the address of the next instruction to be fetched.

The fetched instruction is then loaded into another register, known as the instruction register (IR). The instruction contains the number of bits that specify the action the processor is to take. The processor calculate the meaning of instruction and performs the required action.

The actions of the CPU during an instruction cycle are defined by a sequence of micro operations, each of which typically involves a register transfer operation.

The below given flow chart shows the main function of a CPU.

CPU operation - Basic function of computer
CPU Operation
Computer System Architecture engineering subjects Computer System Architecture

Post navigation

Previous post
Next post
©2026 The Computer Science | WordPress Theme by SuperbThemes