This document covers every topic required for the Cambridge IGCSE Computer Science (0478) examination. It is written to the assessment objectives (AO1‑AO3) and includes concise definitions, tables for quick reference, worked examples and exam‑style questions.
| Binary | Octal | Hexadecimal | Decimal |
|---|---|---|---|
| 0000 0001 | 001 | 01 | 1 |
| 0000 1010 | 012 | 0A | 10 |
| 1111 1111 | 377 | FF | 255 |
Example: Represent –18 in 8‑bit two’s‑complement.
18 = 0001 0010 invert = 1110 1101 +1 = 1110 1110 → –18
| Parameter | Typical value | Effect on file size |
|---|---|---|
| Sample rate | 44 kHz (CD quality) | Higher rate → more samples per second → larger file. |
| Bit depth | 16 bits (CD) or 24 bits (studio) | More bits per sample → greater dynamic range, larger file. |
| Channels | Mono (1) or Stereo (2) | Stereo doubles the data. |
File‑size formula (uncompressed):
Size (bits) = SampleRate × BitDepth × Channels × Duration (seconds)
| Attribute | Typical values |
|---|---|
| Resolution | e.g., 1920 × 1080 pixels (Full HD) |
| Colour depth | 24‑bit (True colour = 16 777 216 colours) |
| Pixel size | Colour depth ÷ 8 bytes per pixel (e.g., 24‑bit = 3 bytes) |
Uncompressed bitmap size:
Size (bytes) = Width × Height × (ColourDepth ÷ 8)
| Unit | Symbol | Bytes |
|---|---|---|
| bit | b | 1/8 byte |
| byte | B | 1 |
| kilobyte | KB | 10³ B |
| kibibyte | KiB | 2¹⁰ B |
| megabyte | MB | 10⁶ B |
| mebibyte | MiB | 2²⁰ B |
| gigabyte | GB | 10⁹ B |
| gibibyte | GiB | 2³⁰ B |
| exbibyte | EiB | 2⁶⁰ B |
Original bitmap row: 1111111100000011 RLE (value, count): (1,8)(0,6)(1,2) Compressed size = 2 bytes per pair → 6 bytes vs. 16 bytes original.
Compressed data travels faster because fewer bits are transmitted. Example: a 5 MB video compressed to 500 KB reduces transmission time by a factor of 10 on a 1 Mbps link.
Compress the binary string 0001111000 using RLE and state the compression ratio.
| Method | How it works | Typical use |
|---|---|---|
| Parity bit (even/odd) | Count 1‑bits; add a bit to make total even (or odd). | Simple serial links, early Ethernet. |
| Checksum | Sum of all bytes modulo 2⁸ (or 2¹⁶); receiver recomputes and compares. | IP, TCP/UDP. |
| CRC (Cyclic Redundancy Check) | Polynomial division; highly reliable. | Ethernet, USB. |
| Medium | Typical speed | Key characteristic |
|---|---|---|
| Twisted‑pair (UTP) | 10 Mbps – 1 Gbps | Widely used for LANs. |
| Fiber‑optic | 10 Gbps – 100 Gbps | Low attenuation, immune to EMI. |
| Wi‑Fi (IEEE 802.11) | 11 Mbps – 600 Mbps | Wireless LAN, uses radio frequencies. |
| Bluetooth | 1 Mbps – 3 Mbps | Short‑range, low power. |
Explain why a parity bit can detect an odd number of bit errors but not an even number.
| Device | Typical CPU | Purpose |
|---|---|---|
| Digital thermostat | 8‑bit microcontroller | Control heating/cooling. |
| Smartphone | ARM multi‑core | General‑purpose computing, sensors. |
| Microwave oven | 16‑bit microcontroller | Timer and power control. |
| Technology | Typical speed | Typical capacity | Key advantage |
|---|---|---|---|
| Magnetic HDD | 80‑200 MB/s | 500 GB‑4 TB | Low cost per GB. |
| Solid‑State Drive (SSD) | 300‑3500 MB/s | 256 GB‑2 TB | No moving parts → faster, more reliable. |
| Optical (CD/DVD/Blu‑ray) | 1‑10 MB/s | 700 MB‑50 GB | Portable, cheap for distribution. |
| Magnetic tape | 100‑300 MB/s (sequential) | 10 TB‑100 TB | Excellent for backup archives. |
Compare a magnetic hard‑disk and an SSD in terms of speed, durability and cost.
| Device | Function | Typical address type |
|---|---|---|
| Network Interface Card (NIC) | Connects a computer to a network. | MAC address (48‑bit) |
| Router | Forwards packets between different networks; performs IP routing. | IP address (IPv4/IPv6) |
| Switch | Connects multiple devices within the same LAN; forwards frames based on MAC. | MAC address |
| Hub | Simple repeat‑and‑broadcast device; no address filtering. | None (broadcast only) |
| Wireless Access Point (WAP) | Provides Wi‑Fi connectivity to wired LAN. | MAC address |
A school network uses a router (192.168.0.1) to connect to the Internet, a switch to link 20 computers, and a WAP for tablets. Explain how a tablet obtains an IP address and reaches a website.
| SQL data type | Definition (syllabus wording) | Typical range / size | SQL example (field definition) |
|---|---|---|---|
INTEGER |
Whole numbers without a decimal part. | ‑2 147 483 648 to 2 147 483 647 (32‑bit signed) | StudentID INTEGER PRIMARY KEY AUTOINCREMENT |
SMALLINT |
Whole numbers that need a smaller range. | ‑32 768 to 32 767 (16‑bit signed) | Age SMALLINT |
REAL / FLOAT |
Numbers that may contain a fractional part. | ≈ ±3.4 × 10³⁸ with ~7 decimal digits of precision | Weight REAL |
DECIMAL(p,s) |
Exact numeric values with p total digits, s after the decimal point (used for money). | Range depends on p; two‑decimal‑place precision when DECIMAL(10,2) |
EnrolmentFee DECIMAL(10,2) |
CHAR(n) |
Fixed‑length character string of exactly n characters. | n ≤ 255 (each character 1 byte) | Gender CHAR(1) |
VARCHAR(n) |
Variable‑length character string up to n characters. | n ≤ 65535 (stores only the characters entered + 1 byte length) | FirstName VARCHAR(30) |
BOOLEAN |
Two possible values – TRUE / FALSE (or 1/0). |
1 byte (implementation dependent) | IsFullTime BOOLEAN |
DATE |
Calendar date (year‑month‑day). | ‘YYYY‑MM‑DD’ – stored in 3 bytes on most systems. | DateOfBirth DATE |
TIME |
Clock time (hour‑minute‑second). | ‘HH:MM:SS’ – stored in 3 bytes. | StartTime TIME |
TIMESTAMP |
Combined date and time (e.g., ‘2025‑12‑30 14:23:05’). | Usually 8 bytes. | RegistrationDate TIMESTAMP |
CHAR(n) only when every entry is exactly n characters (e.g., country codes). Otherwise use VARCHAR(n).DATE, TIME or TIMESTAMP types – this enables date arithmetic and proper sorting.BOOLEAN for binary choices; avoid “yes/no” as text.VARCHAR limit if the field may need more characters later.INTEGER is ideal.PRIMARY KEY in the CREATE TABLE statement.REFERENCES other_table(other_field) and must match the PK’s data type.CHECK constraints (e.g., CHECK (Age >= 0)).NOT NULL for mandatory fields.CHAR/VARCHAR.CREATE TABLE Student (
StudentID INTEGER PRIMARY KEY AUTOINCREMENT,
FirstName VARCHAR(30) NOT NULL,
LastName VARCHAR(30) NOT NULL,
DateOfBirth DATE NOT NULL,
Gender CHAR(1) CHECK (Gender IN ('M','F','O')),
Age SMALLINT CHECK (Age >= 0),
EnrolmentFee DECIMAL(10,2) NOT NULL,
IsFullTime BOOLEAN NOT NULL,
RegistrationDate TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
| Field | Suggested data type | Reasoning (syllabus points) |
|---|---|---|
| StudentID | INTEGER (auto‑increment, PK) | Unique whole‑number identifier; smallest suitable integer type. |
| FirstName / LastName | VARCHAR(30) | Variable‑length text; 30 characters is enough for typical names. |
| DateOfBirth | DATE | Allows age calculations and proper sorting. |
| Gender | CHAR(1) | Only one character needed; fixed length saves space. |
| Age | SMALLINT | Student ages never exceed 150 – SMALLINT is sufficient. |
| EnrolmentFee | DECIMAL(10,2) | Exact monetary value; two decimal places avoid rounding errors. |
| IsFullTime | BOOLEAN | Binary choice – true if full‑time, false otherwise. |
| RegistrationDate | TIMESTAMP | Records both date and time of registration automatically. |
SELECT FirstName, LastName FROM Student WHERE IsFullTime = TRUE;INSERT INTO Student (FirstName, LastName, DateOfBirth, Gender, Age, EnrolmentFee, IsFullTime) VALUES ('Ada', 'Lovelace', '2000-12-10', 'F', 23, 1500.00, TRUE);UPDATE Student SET EnrolmentFee = EnrolmentFee * 1.05 WHERE Age >= 18;DELETE FROM Student WHERE IsFullTime = FALSE AND Age < 18;SELECT FirstName, EnrolmentFee FROM Student ORDER BY EnrolmentFee DESC LIMIT 5;SELECT AVG(EnrolmentFee) FROM Student WHERE IsFullTime = TRUE;SELECT Gender, COUNT(*) FROM Student GROUP BY Gender;CREATE TABLE line:
| Field | Typical content |
|---|---|
| PhoneNumber | e.g. 07123456789 |
| Score | 0 – 100 (integer) |
| Comment | Free‑text up to 200 characters |
| Joined | date and time of first login |
EnrolmentFee, showing their full name (concatenated) and fee, ordered from highest to lowest.DECIMAL(10,2) is preferred to REAL for storing monetary values.Course has primary key CourseID INTEGER. Write the field definition for a foreign key CourseID in the StudentCourse table.StudentID INTEGER, Age SMALLINT, IsFullTime BOOLEAN. (Assume 4 bytes for INTEGER, 2 bytes for SMALLINT, 1 byte for BOOLEAN.)| Data type | Typical use | Size (bytes) |
|---|---|---|
| INTEGER | IDs, counts | 4 |
| SMALLINT | Small whole numbers (age) | 2 |
| REAL / FLOAT | Measurements, scientific data | 4‑8 (implementation) |
| DECIMAL(p,s) | Money, exact fixed‑point | Varies
Create an account or Login to take a Quiz
41 views
0 improvement suggestions
Log in to suggest improvements to this note. Support e-Consult KenyaYour generous donation helps us continue providing free Cambridge IGCSE & A-Level resources, past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya. |