Part of the Punjab Police ASI 2026 course.Take a mock test →
DIGITAL LITERACY · FOUNDATION SERIES

Computer Basics: Hardware, Software, CPU and the Five Generations

A simple guide to what a computer is: its parts, hardware and software, what happens inside the CPU, the five generations, programming languages and the full forms exams ask.

Punjab PolicePSSSB14 MIN READ
Two programmers setting cables and switches on the large panels of the ENIAC computer
Glen Beck and Betty Snyder program the ENIAC (Electronic Numerical Integrator And Computer). ENIAC filled a whole room. Today a phone chip is far more powerful. Image: U.S. Army photo, Wikimedia Commons · Public domain

A computer is an electronic machine. It takes input, processes it by following instructions, gives output and stores the result. It works only with 0 and 1 (binary). This page covers the basics that Punjab Police SI and Constable papers ask again and again: parts of a computer, hardware and software, what happens inside the CPU, the five generations, programming languages and common full forms.

60+
Past questions on this page
Punjab Police SI & Constable
5
Generations of computers
Tube → transistor → IC → chip → AI
1947
Transistor invented
Bell Labs, USA
3
Parts of the CPU
ALU, CU, memory unit

What a computer is and what it does

Five functions and eight qualities. Easy marks.

HOW EVERY COMPUTER WORKS
  1. Input
    You enter data and instructions (keyboard, mouse).
  2. CPU
    Processing
    The CPU works on the data.
  3. Output
    You get the result (screen, printer).
  4. Storage
    Data and results are saved for later.
This is called the input–process–output cycle.
FunctionWhat it means
InputtingEntering data and instructions into the computer
StoringSaving data and instructions so they are ready for processing
ProcessingDoing arithmetic and logic work on the data
OutputtingGiving the result to the user
ControllingDirecting the order in which all the steps happen
KEY TERM
Binary and Boolean logic

Modern digital computers store everything as 0s and 1s (binary). They decide with Boolean logic (true/false, AND, OR, NOT). They do not use continuous (analog) signals for their work.

0 and 1→Boolean logic→digital computer
Quality
Speed

Millions of steps each second. Measured in MIPS (Millions of Instructions Per Second).

Quality
Accuracy and reliability

Gives correct results if the input and program are correct.

Quality
Diligence and versatility

Never gets tired or bored. Can do many kinds of work.

Quality
Power of remembrance

Stores data and gives it back whenever needed.

Limit
No IQ, no feelings

Cannot think for itself. It does nothing without instructions.

Installation is not a quality of a computer. It is a job you do on it.

  • Where computers are used: banking (online transactions, fraud checks), ATM (Automated / Automatic Teller Machine), weather forecasting, gaming, and education (online learning platforms).
  • A job done fully by hand, like laying bricks manually, is not a computer application.
QUICK CHECK
Which of the following is NOT a characteristic of a computer?
Tap an option to answer
QUICK CHECK
Match the functions with their meaning. I. Inputting, II. Storing, III. Controlling — 1. Saving data and instructions for processing, 2. Directing the order of operations, 3. Entering data and instructions.
Tap an option to answer

Hardware, software and firmware

What you can touch, what you cannot, and the layers in between.

THREE WORDS THAT GET MIXED UP
Hardware
Software
Firmware
What it is
Physical parts you can touch
Programs; cannot be touched
Fixed program inside a device
Examples
CPU, monitor, hard disk
Windows, MS Word
BIOS, phone firmware
Lives in
The machine itself
Disk / memory
ROM / flash chip
Monitor (visual display unit), CPU and storage device are hardware. Software is not a physical part.
THE LAYERS OF A COMPUTER SYSTEM (OUTSIDE TO INSIDE)
  1. User
    You.
  2. Application software
    Programs for your work: word processor, browser, Photoshop.
  3. System software
    Runs the machine: operating system, drivers, translators.
  4. core
    Hardware
    The physical machine at the centre.
If a diagram leaves the innermost box blank, the answer is hardware.
SYSTEM SOFTWARE
  • Operating systems: Windows, Android, Linux
  • Device drivers
  • Language translators: compiler, interpreter, assembler (e.g. Java compiler)
  • Its job: manage and control the hardware
APPLICATION SOFTWARE
  • Word processors: MS Word, KWrite (Linux), Pages (Mac)
  • Spreadsheets: Excel, Numbers (Mac)
  • Presentation: PowerPoint, Keynote (Mac)
  • Others: Microsoft Edge (browser), Adobe Photoshop, Zoom, Webex
KEY TERM
Firmware and BIOS

Firmware is a program written permanently into a device's chip. It runs the basic work of that hardware, for example in a smartphone. It is made for that one device. BIOS (Basic Input Output System) is the firmware on a computer's motherboard. When you switch on, it checks the hardware and starts loading the operating system. This start-up is called booting.

Power on→BIOS checks hardware→OS loads
PartInside or peripheral?Note
Mouse, keyboard, printerPeripheralAttached from outside to give input or take output
CPU, RAM, hard diskCore partsProcessing chips, internal memory and storage
VGA cardExpansion cardAlso called video / display card or graphics adapter. Makes the picture for the monitor.
NICExpansion cardNetwork Interface Card: connects to a network
A single computer = CPU chips + internal memory + I/O devices and peripherals.
QUICK CHECK
Which of the following are examples of system software? (i) Microsoft Edge (ii) Android (iii) Java Compiler (iv) Adobe Photoshop
Tap an option to answer
QUICK CHECK
Which statement(s) about firmware is/are NOT correct? I. Firmware runs the basic operations of a smartphone's hardware. II. Firmware is closely tied to its particular device.
Tap an option to answer

Inside the CPU

ALU, CU, registers and buses: the brain of the computer.

A square processor chip sitting in its socket on a computer motherboard
A modern CPU in its socket on the motherboard. This one is an eight-core processor: one chip, eight cores working side by side. Image: Brian Wong, Wikimedia Commons · CC BY-SA 2.0
ALU
Arithmetic Logic Unit

Does the sums (+ − × ÷) and the comparisons (greater, equal, AND/OR).

CU
Control Unit

Manages and coordinates all other parts. Fetches and decodes each instruction.

Memory
Storage (memory) unit

Holds the data and instructions to be processed, and the intermediate results.

The CPU's main job is processing data, not input, output or long-term storage.

THE MACHINE CYCLE: WHAT THE CPU DOES AGAIN AND AGAIN
  1. Fetch
    The CU takes the next instruction from memory. The program counter tells it where.
  2. Decode
    The instruction sits in the instruction register and is understood.
  3. Execute
    The ALU does the work.
  4. Store
    The result goes back to a register or memory.
RegisterWhat it holds
Program Counter (PC), also "program control register"Address of the next instruction
Instruction Register (IR)The instruction being executed now
Memory Address Register (MAR)Address of the memory location being used
Memory Data / Buffer Register (MDR / MBR)The data being read from or written to memory
REMEMBER

PC = Pointing to the Coming one (next instruction). IR = In Running (current instruction).

THE THREE BUSES (ROADS FOR SIGNALS)
Data bus
Address bus
Control bus
Carries
The data itself
Where to read/write
Read, write, timing signals
Direction
Both ways
CPU → memory
Both ways
There is no "security bus". Only these three make up the system bus.
  • 64-bit vs 32-bit: the big gain of a 64-bit processor is that it can directly use much more RAM. A 32-bit system is limited to about 4 GB.
  • Multicore processor: one chip with two or more cores. It handles more work in parallel and runs many programs (threads) at the same time.
  • Backward compatible: a new CPU that still understands all the instructions of the older CPU, plus some new ones.
  • The CPU can be on one or more microchips called integrated circuits.
QUICK CHECK
Which part of the computer system manages and coordinates the operations of all the other parts?
Tap an option to answer
QUICK CHECK
Which register holds the instruction that the CPU is executing right now?
Tap an option to answer
QUICK CHECK
The computer bus which is NOT used to transfer data between components of a computer is:
Tap an option to answer

Before modern computers: the pioneers

Pascal, Babbage, Hollerith, von Neumann and the ENIAC.

Machines that came first
Image
Who's who
Old photograph of Charles Babbage, seated
Charles Babbage
1791–1871 · Called the father of the computer
  • Designed the Difference Engine and the Analytical Engine
  • The Analytical Engine had the idea of a mill (processor) and a store (memory)
Portrait of Herman Hollerith with a moustache
Herman Hollerith
1860–1929 · Punched-card tabulating machine
  • His tabulating machine counted the 1890 US census
  • Called the first step towards programming
Black and white portrait of John von Neumann in a suit
John von Neumann
1903–1957 · Stored-program concept
  • Said one memory should hold both the data and the program (1945 report on the EDVAC)
  • Most computers today still follow this "von Neumann" design
A long room lined with ENIAC's tall panels of switches and cables
ENIAC = Electronic Numerical Integrator And Computer. Built by J. Presper Eckert and John Mauchly at the University of Pennsylvania, USA, and shown to the public in 1946. It used vacuum tubes. Image: U.S. Army photo, Wikimedia Commons · Public domain
FROM ADDING MACHINE TO SMARTPHONE
  1. 1642
    Pascaline

    Blaise Pascal's mechanical adding machine.

  2. 1830s
    Analytical Engine

    Charles Babbage designs a general-purpose machine.

  3. 1890
    Tabulating machine

    Hollerith's punched cards count the US census.

  4. 1945
    Stored-program idea

    John von Neumann's report on the EDVAC.

  5. 1946
    ENIAC

    The famous vacuum-tube computer is shown to the public.

  6. 1947
    Transistor

    Invented at Bell Labs, USA, from semiconductor material.

  7. 1971
    Intel 4004

    An early single-chip microprocessor.

  8. 2007
    First iPhone

    Apple introduces its first iPhone.

QUICK CHECK
______ is considered the first step towards programming, and it was designed by Herman Hollerith.
Tap an option to answer
QUICK CHECK
Who introduced the concept of the stored-program computer, which could store both data and programs in memory?
Tap an option to answer

The five generations of computers

Each generation is named after the part that did the switching.

Smaller and smaller: tube → transistor → IC → microprocessor
Image
GenerationAbout whenMain technologyLanguages and other marks
First1940s–1956Vacuum tubesMachine language. Punched cards and paper tape; magnetic tape use began. ENIAC, UNIVAC.
Second1956–1963TransistorsAssembly language and early high-level languages (FORTRAN, COBOL).
Third1964–1971Integrated circuits (IC)High-level languages such as PL/1, PASCAL, BASIC. Keyboards, monitors, operating systems.
Fourth1971 onwardsMicroprocessors (VLSI)Personal computers, GUI, networks.
FifthPresent and futureULSI chips, artificial intelligenceULSI puts about ten million parts on one chip. Voice and natural-language input.
Books give slightly different years for each generation. Learn the technology; that is what papers test.
REMEMBER

"Very Tall Indian Men Act" = Vacuum tube → Transistor → IC → Microprocessor → AI (ULSI).

COMMON TRAPS
  • VLSI vs ULSI: VLSI (very large-scale) = 4th generation. ULSI (ultra large-scale) = 5th generation.
  • The transistor was invented in 1947, but second-generation computers came later. Don't mark 1947 as the first generation.
  • A microchip is an integrated circuit, not a single transistor or capacitor.
QUICK CHECK
Computers of which generation were made using transistors?
Tap an option to answer
QUICK CHECK
Which fifth-generation technology produces microprocessor chips with ten million electronic components?
Tap an option to answer
QUICK CHECK
Use of magnetic tapes as input and output devices started in the ______ generation of computers.
Tap an option to answer

Programming languages and translators

From 0s and 1s to Python, and the flowchart symbols.

LevelWritten asTranslator needed
Machine (binary) languageOnly 0s and 1sNone: the CPU understands it directly
Assembly languageShort codes like ADD, MOVAssembler
High-level languageEnglish-like words: C, Java, PythonCompiler or interpreter
COMPILER VS INTERPRETER
Compiler
Interpreter
Translates
The whole program at once
One line at a time
Errors shown
After translating all
Line by line
Both are system software, like the assembler.
  • Source program: the program as the programmer writes it, in a high-level language. The translator turns it into an object program in machine language.
  • IDE (Integrated Development Environment): one software with a text editor, build tools and a debugger.
Science
FORTRAN

FORmula TRANslation. Made at IBM (1957) for scientific and number work.

Statistics
R

Mainly used in statistical software.

Data science
Python

The language most used in data science today.

Object-oriented
C++

A popular general-purpose object-oriented language (C with classes).

Flowchart symbolUsed for
OvalStart / end
ParallelogramInput / output
RectangleA process or step
DiamondA decision (Yes / No)
ArrowsDirection of flow
QUICK CHECK
______ does not need any interpreter or compiler, because the computer understands these signals directly.
Tap an option to answer
QUICK CHECK
The decision function in flowcharting is represented by:
Tap an option to answer

Types of computers, interfaces and codes

PC to supercomputer, CLI to voice, and ASCII.

A tall round Cray supercomputer with a bench-like base in a computer room
A Cray supercomputer at a US research facility. Supercomputers are the fastest kind, used for work like weather forecasting. Image: Unknown photographer, Wikimedia Commons · Public domain
TypeIn simple words
Personal computer (PC)Single-user, with a moderately powerful microprocessor
Mini computerServes several users at once; smaller than a mainframe
MainframeLarge machine for hundreds of users, e.g. banks
SupercomputerFastest; heavy science work
WAYS TO TALK TO A COMPUTER (USER INTERFACES)
CLI
GUI
VUI
Full form
Command Line Interface
Graphical User Interface
Voice User Interface
You use
Typed commands
Windows, icons, mouse
Your voice
Example
MS-DOS
Windows
Voice assistants
"Task user interface" is not a real interface type. Text (command) mode is cumbersome, slow and limited, which is why GUIs took over.
KEY TERM
ASCII

American Standard Code for Information Interchange. A 7-bit code, so it has 2⁷ = 128 codes (0–127). It gives a number to each letter, digit, punctuation mark and control character.

A→65→1000001
QUICK CHECK
Which of the following is a single-user computer system that has a moderately powerful microprocessor?
Tap an option to answer
QUICK CHECK
Which one of the following is NOT a valid user-computer interface?
Tap an option to answer

Quick revision

Full forms, traps and one-line facts.

FLASHCARDS
Full forms: tap to check
CPU
Central Processing Unit
ALU
Arithmetic Logic Unit
ENIAC
Electronic Numerical Integrator And Computer
BIOS
Basic Input Output System
GUI
Graphical User Interface
ASCII
American Standard Code for Information Interchange
MIPS
Millions of Instructions Per Second
IDE
Integrated Development Environment
ATM
Automated / Automatic Teller Machine
DLP (3D printing)
Digital Light Processing
IMEI
International Mobile Equipment Identity
ULSI
Ultra Large-Scale Integration
COMMON TRAPS
  • PC vs IR: PC = address of the next instruction; IR = the current instruction.
  • Android is system software (an operating system), not an app.
  • A compiler is system software; a word processor is not.
  • Mouse is a peripheral; CPU, RAM and hard disk are core parts.
  • Monitor size does not change computer speed.
Also asked onceTap to open
  • Apple introduced its first iPhone in 2007.
  • Dial *#06# to see your phone's IMEI number (15 digits).
  • .AU is a basic audio file type supported by Windows. (.GIF is an image, .BAT is a batch file.)
  • KWrite is a text / word-processing program on Linux (KDE).
  • DLP in 3D printing = Digital Light Processing.
  • Both are true: operating systems and device drivers are system software, and system software manages and controls hardware.
CHECK YOURSELF

Name the three parts of the CPU and say what each does in one line.

Show answer

ALU does arithmetic and logic. CU controls and coordinates all parts. The memory unit holds data, instructions and intermediate results.

Frequently Asked Questions

What is a computer in simple words?

A computer is an electronic machine that takes input, processes it by following instructions, gives output and stores data. It works with binary numbers (0 and 1).

What is the difference between hardware and software?

Hardware is the physical part you can touch, like the CPU, monitor and hard disk. Software is the set of programs that tell the hardware what to do, like Windows or MS Word.

What are the three parts of a CPU?

The Arithmetic Logic Unit (ALU), the Control Unit (CU) and the memory (storage) unit with its registers.

Which part of the CPU controls all other parts?

The Control Unit (CU). It fetches and decodes instructions and sends signals to memory, the ALU and the input-output devices.

What are the five generations of computers?

First: vacuum tubes. Second: transistors. Third: integrated circuits. Fourth: microprocessors (VLSI). Fifth: ULSI chips and artificial intelligence.

What is the full form of ENIAC?

Electronic Numerical Integrator And Computer. It was built by J. Presper Eckert and John Mauchly at the University of Pennsylvania and shown to the public in 1946.

Who gave the stored-program concept?

John von Neumann, in his 1945 report on the EDVAC. In this design one memory holds both the data and the program.

Is Android system software or application software?

Android is an operating system, so it is system software. A compiler is also system software. Browsers and Photoshop are application software.

Which language does a computer understand directly?

Machine (binary) language, written only in 0s and 1s. It needs no compiler, interpreter or assembler.

Which flowchart symbol shows a decision?

The diamond. It holds a condition and has two exits, usually Yes and No. An oval shows start or end, and a rectangle shows a process.

← All Computer Fundamentals notes