Featured image of post What are the Five Major Components of a Computer? Basic Knowledge of Hardware and Software for IT Beginners

What are the Five Major Components of a Computer? Basic Knowledge of Hardware and Software for IT Beginners

Explains how computers work in a way that is easy for IT beginners to understand. Summarizes the basic knowledge you should know as IT fundamentals, from the roles of the 'five major components'—input, output, memory, control, and arithmetic—to the relationship between hardware and software (programs).

Basic Knowledge of Computers

This page explains what a computer is.

Definition of a Computer

A computer is a machine that has the following five units:

  1. Input unit
  2. Output unit
  3. Storage unit
  4. Control unit
  5. Arithmetic logic unit

Roughly speaking, a computer is a machine that performs a specific process on a certain input and outputs the result. It can store, calculate, and output the input data. Control has the role of controlling the aforementioned four units.

What is needed to operate a computer

To operate a computer, programs (software) are needed in addition to the devices (hardware).

Programs instruct the computer on what kind of processing to perform. Programs are written in a format that the computer can understand.

An example of a program is as follows. A program that calculates the sum from 1 to an input integer:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
using namespace std;

int main() {
    // Secure necessary storage area
    int n, sum = 0;
    
    // Output
    cout << "Please enter an integer: ";
    
    // Input 
    cin >> n;
    
    // Calculation
    for (int i = 1; i <= n; i++) { // Calculation
        sum += i;
    }
    
    // Output
    cout << "The sum from 1 to " << n << " is " << sum << "." << endl;
    
    // Exit
    return 0;
}

The program is converted into machine code by a compiler, transforming it into a format that the computer can execute.