A computer is an electronic device that accepts data as input, processes it under the control of a set of instructions called a program, and produces meaningful results as output. The word "computer" is derived from the Latin word "computare", which means "to calculate". However, modern computers do far more than mere calculation; they can store, retrieve, organise and share vast amounts of information at incredible speeds. The journey of the modern computer began with mechanical devices like the Abacus and evolved through the Analytical Engine of Charles Babbage, the first-generation vacuum-tube computers, and finally to today's compact, high-speed machines based on integrated circuits and microprocessors.
Every computer, whether a small smartphone or a giant supercomputer, works on the same fundamental principle known as the IPO (Input-Process-Output) cycle. Data and instructions are entered through input devices, the central processing unit processes them, and the results are delivered through output devices. Storage devices hold data and programs for immediate use (main memory) or for long-term preservation (secondary storage). This chapter provides a bird's-eye view of the entire computer system: its physical components, how they interact, the types of software, and how the operating system manages all these resources.
The importance of understanding a computer system lies in the fact that it forms the foundation of every programming language, every application and every digital service we use. Before a student writes their first line of Python, they must know what happens inside the machine when that program runs. A sound knowledge of hardware organisation, memory hierarchy and software classification makes problem-solving with computers far more logical and intuitive.
A computer system is a collection of interrelated components that work together to achieve a common goal. The basic organisation of a computer can be visualised as three primary units: the Central Processing Unit (CPU), the memory unit, and the input/output (I/O) units. The CPU is further divided into the Arithmetic Logic Unit (ALU) and the Control Unit (CU).
The CPU is often called the "brain" of the computer. It executes the instructions of a program. It consists of: - Arithmetic Logic Unit (ALU): Performs all arithmetic operations such as addition, subtraction, multiplication and division, as well as logical operations such as comparing two values (equal to, greater than, less than). - Control Unit (CU): Directs and coordinates the operations of all the other components. It fetches instructions from memory, decodes them, and generates the control signals needed to execute them. - Registers: Small, extremely fast storage locations inside the CPU used to hold data currently being processed, memory addresses, or intermediate results.
The memory unit stores data and instructions. It can be broadly classified into primary memory (main memory, such as RAM) which is directly accessible by the CPU, and secondary memory (such as hard disks) which is used for permanent storage. A more detailed discussion appears later in this chapter.
Input devices translate human-understandable information into a form the computer can process. Examples include the keyboard, mouse, scanner and microphone. Output devices do the reverse; they translate machine-readable results into a form humans can understand. Examples include the monitor, printer and speakers.
For the CPU, memory and I/O devices to communicate, they must be connected. This connection is provided by a set of parallel wires or electrical pathways known as the system bus. A bus simply transfers data or signals between components. Based on what they carry, buses are of three types:
A CPU with an 8-bit data bus and a 16-bit address bus, for example, can transfer 8 bits at a time and address 2^16 = 65536 memory locations.
Memory is the component that stores data and instructions. The memory of a computer is organised as a hierarchy because no single memory technology can simultaneously be very fast, very large and very cheap.
Primary memory is directly accessible by the CPU and is typically volatile (loses its contents when power is switched off). - Random Access Memory (RAM): Allows data to be read from or written to any location in any order, hence the name "random". It is used to hold the currently executing program and its data. It is volatile. - Read Only Memory (ROM): Data can only be read, not normally written. It is non-volatile and is used to store the bootstrap program and firmware that are needed when the computer is switched on.
Cache is a small, very fast memory placed between the CPU and main memory. It stores copies of frequently accessed data from RAM, so the CPU can fetch them quickly instead of waiting for the slower RAM. The presence of cache significantly improves the effective processing speed.
Secondary memory is non-volatile and is used to store data and programs permanently, even when power is off. Examples include hard disk drives (HDD), solid-state drives (SSD), compact discs (CD), DVDs, pen drives and memory cards. It is cheaper than primary memory but slower. The CPU cannot access it directly; data must first be loaded into primary memory.
A binary digit (0 or 1) is called a bit, and it is the smallest unit of memory. Eight bits form one byte. Memory capacities are expressed in the following units:
| Unit | Size |
|---|---|
| 1 Kilobyte (KB) | 1024 bytes (2^10) |
| 1 Megabyte (MB) | 1024 KB (2^20 bytes) |
| 1 Gigabyte (GB) | 1024 MB (2^30 bytes) |
| 1 Terabyte (TB) | 1024 GB (2^40 bytes) |
| 1 Petabyte (PB) | 1024 TB (2^50 bytes) |
Software is the set of programs and instructions that tell the hardware what to do. Without software, hardware is useless. Software is broadly classified into system software and application software.
System software is designed to manage and control the computer hardware and to provide a platform on which application programs can run. It includes: - Operating System (OS): The most important system software. It manages hardware resources, provides a user interface, and runs application programs. - Language Processors: Translate programs written in high-level languages into machine code. Examples are compilers, interpreters and assemblers. - Device Drivers: Software that allows the operating system to communicate with specific hardware devices such as printers, scanners and network cards.
Application software is designed to help the user perform specific tasks. Examples include word processors, spreadsheets, web browsers, media players and database management systems.
Utility software is a type of system software that helps in maintaining and analysing the computer system. Examples include disk defragmenters, anti-virus programs, backup tools, file compression tools and system cleaners.
The operating system is the master control program of the computer. When a computer is switched on, a small program in ROM called the bootstrap loader runs first; it loads the operating system into RAM, a process called booting. Once loaded, the OS performs several essential functions:
Common examples of operating systems include Windows, Linux, macOS, and mobile operating systems like Android and iOS.
Based on size, speed and capacity, computers can be classified into the following types:
| Component | Function |
|---|---|
| ALU | Performs arithmetic and logical operations |
| Control Unit | Fetches, decodes and coordinates instruction execution |
| Registers | Very fast temporary storage inside the CPU |
| RAM | Volatile main memory for running programs |
| ROM | Non-volatile memory holding the bootstrap program |
| Cache | Fast memory between CPU and RAM |
| Secondary storage | Permanent, non-volatile storage of data and programs |
| Term | Number of Bytes | Example Use |
|---|---|---|
| Bit | 1 binary digit | Building block of data |
| Byte | 8 bits | One character |
| Kilobyte | 1024 bytes | A small text file |
| Megabyte | 1024 KB | A song or photo |
| Gigabyte | 1024 MB | A movie or operating system |
| Terabyte | 1024 GB | Large database servers |
The computer system is a beautifully coordinated combination of hardware and software that converts raw data into useful information. The CPU processes data, memory stores it at different levels of a carefully balanced hierarchy, buses connect everything, and the operating system manages the entire show. Understanding this overview is the essential first step for any computer science student. In the next chapters, we will learn how data is represented inside the machine in binary form, how logic gates process that data, and finally how to write instructions in the Python programming language. A clear mental model of the computer system will make all of those topics considerably easier to grasp.