Skip to content

CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice

Computer Hardware and Software: formula sheet

Full chapter guide

Key formulas

Basic computer cycle
Input → Processing (CPU) → Output, with Storage supporting all stages
Use this as the frame for any question on how a computer works.
Instruction cycle
Fetch → Decode → Execute (then repeat)
The control unit fetches and decodes. The ALU executes arithmetic or logic operations.
CPU components
CPU = ALU + Control Unit + Registers
Cache is often built into or placed next to the CPU but is listed under memory.
Memory hierarchy
Registers > Cache > RAM > Secondary storage (speed falls, size rises, cost per unit falls)
Speed and cost per unit fall as you move down; capacity rises.
Volatility rule
RAM and cache: volatile. ROM and secondary storage: non-volatile
Typical case. Some ROM types can be rewritten, but they still keep data without power.
Buses
System bus = Data bus + Address bus + Control bus
Data bus carries data, address bus carries memory locations, control bus carries command signals.
Classification by size
Supercomputer > Mainframe > Minicomputer > Microcomputer (in order of power and scale)
This is the usual textbook order. Individual machines can overlap, so treat it as a general guide.
Classification by purpose
General-purpose (many tasks) | Special-purpose (one fixed task)
Ask whether the machine can be reprogrammed for varied tasks.
Classification by data handling
Analog (continuous data) | Digital (binary data) | Hybrid (both)
Hybrid means analog input converted for digital processing.
Generations by technology
1st: vacuum tubes | 2nd: transistors | 3rd: integrated circuits | 4th: microprocessors | 5th: AI-based
Dates differ slightly across books, so rely on the technology rather than exact years.
System vs application software
System software = manages and runs the computer; Application software = performs a specific user task
Application software depends on system software. The reverse is not true.
Compiler vs interpreter vs assembler
Compiler: whole program at once, high-level to machine code. Interpreter: line by line, executes immediately. Assembler: assembly language to machine code
A compiler reports errors after scanning the program. An interpreter stops at the first error it meets.
Core functions of an OS
Process, memory, file, device and security management + user interface + resource allocation
Use this as the skeleton of any 'functions of OS' answer.
Types of OS
Batch | Multiprogramming | Time-sharing | Real-time (hard, soft) | Distributed | Network | Mobile
Give one-line meaning and one use for each.
Firmware and driver
Firmware = permanent code inside the device; Driver = software on the computer that lets the OS control the device
Both are system software, but they live in different places.
Application vs system software
Application software = serves the user's task; System software = runs and manages the hardware
Use this one-line contrast to open any answer on types of software.
Language levels
Machine (1GL) → Assembly (2GL) → High-level procedural (3GL) → Non-procedural/4GL → 5GL
Each generation moves further from hardware and closer to human language.
Translators
Assembler: assembly → machine code; Compiler: whole high-level program → machine code; Interpreter: executes line by line
Match the translator to the language type.
Open source vs proprietary
Open source = source code available under licence; Proprietary = source code closed, owner-controlled licence
Compare on source code, cost, modification, support, and security visibility.
Common licence types
Proprietary/commercial, freeware, shareware, open source (e.g. GPL, MIT, Apache), SaaS subscription
Say which rights the user gets: use, copy, modify, redistribute.
Network size classes
LAN (building/campus) < MAN (city) < WAN (country/world)
Classify by geographic spread, not by number of devices.
Cloud service models
IaaS (infrastructure) → PaaS (platform) → SaaS (software)
Moving from IaaS to SaaS, the provider manages more and you manage less.
Cloud deployment models
Public | Private | Hybrid | Community
Based on who owns and who uses the infrastructure.
Virtualization
1 physical machine + hypervisor = many virtual machines
Each virtual machine runs its own operating system and is isolated from others.
Edge vs cloud
Edge = process near the source; Cloud = process in a central remote data centre
Edge suits low-delay needs; cloud suits heavy computing and large storage.
Database vs DBMS
DBMS = software; Database = the data it manages
Do not use the two terms as if they mean the same.
SQL retrieval syntax
SELECT column FROM table WHERE condition
Basic query pattern. Add ORDER BY or GROUP BY if needed.
SQL command groups
DDL: CREATE, ALTER, DROP | DML: INSERT, UPDATE, DELETE | DCL: GRANT, REVOKE | TCL: COMMIT, ROLLBACK
SELECT is often listed under DML or as DQL. State which grouping you follow.
Warehouse vs lake
Warehouse = schema-on-write (structured, processed); Lake = schema-on-read (raw, any format)
The most tested contrast in storage questions.
Keys
Primary key = unique row identifier; Foreign key = column referring to another table's primary key
Keys link tables in a relational database.

Quick revision

  • Hardware is the physical equipment; software is the set of instructions that runs on it.
  • The CPU processes instructions; memory holds data and programs in use; storage keeps data for the long term.
  • RAM is volatile and loses its contents when power is off; ROM is non-volatile.
  • Computers can be classified by size, purpose and the type of data they handle.
  • System software manages hardware and provides a platform; the operating system is its main example.
  • Application software performs tasks for users, such as accounting or word processing.
  • A compiler translates a whole program at once; an interpreter translates and runs it line by line.
  • A network connects devices to share data and resources; LAN, MAN and WAN differ by area covered.
  • Cloud models: IaaS, PaaS and SaaS; deployment can be public, private, hybrid or community.
  • A DBMS creates, stores, retrieves and controls access to data, reducing duplication.
  • Know the difference between structured and unstructured data and where each is stored.
  • Always link a technical point to a risk, control or legal duty in your answer.

Common mistakes

  • Treating RAM and ROM as both permanent or both temporary. Fix: Remember: RAM is volatile and read-write. ROM is non-volatile and mainly holds startup instructions.
  • Saying the hard disk is the main memory. Fix: Main (primary) memory is RAM and ROM. Hard disk and SSD are secondary storage.
  • Treating a server as a size category like mainframe or minicomputer. Fix: Say a server is defined by its role of serving clients, and it can run on different sizes of hardware.
  • Saying a digital computer handles continuous data. Fix: Link analog with continuous physical quantities and digital with binary 0 and 1.
  • Treating firmware and device drivers as the same thing. Fix: Remember where each sits. Firmware is stored in the device. A driver is installed on the computer so the OS can use the device.
  • Saying a compiler runs the program line by line. Fix: Compiler translates the whole program first. Interpreter translates and runs each statement in turn.
  • Saying open source software is always free of charge. Fix: Say open source means source code is available under a licence. Vendors may still charge for support or services.
  • Treating assembly language as a high-level language. Fix: Remember that assembly is low level and machine-specific, and needs an assembler.
  • Mixing up PaaS and SaaS Fix: If the user writes and deploys code, it is PaaS. If the user only uses a finished application, it is SaaS.
  • Calling a hybrid cloud any use of two public clouds Fix: Hybrid combines private and public infrastructure. Two public providers is usually called multi-cloud.

Exam tips

  • Expect compare-and-contrast questions on RAM, ROM, cache and secondary storage. Prepare pointwise differences.
  • Draw a neat labelled block diagram for architecture questions. It earns marks quickly.
  • Give a real example for each device. Examples show understanding in a case-based answer.
  • Link hardware to cyber security where the question allows: volatile memory in forensics, physical access control, device theft.
  • Keep answers short and structured. Definition, points, example, conclusion.
  • Always name the basis of classification first. It shows the examiner your structure.
  • Give a real Indian example where you can, such as banks using mainframes or ATMs as special-purpose systems.
  • For differentiate questions, use side-by-side points rather than long paragraphs.