Understanding binary, octal, decimal and hexadecimal is essential for all later topics.
| System | Base | Digits Used | Typical Use in CS |
|---|---|---|---|
| Binary | 2 | 0, 1 | Memory storage, machine code, logic operations |
| Octal | 8 | 0‑7 | Compact representation of binary (3 bits per digit) |
| Decimal | 10 | 0‑9 | Human‑readable numbers, arithmetic |
| Hexadecimal | 16 | 0‑9, A‑F | Memory addresses, colour codes, debugging |
Key conversions (quick‑scan sheet)
Convert the binary number 10110110₂ to decimal and hexadecimal.
A 640 × 480 colour image at 24‑bit colour requires:
\(640 \times 480 \times 24 = 7,372,800\) bits ≈ 0.88 MB.
Discuss why lossless compression (e.g., PNG) is preferred for medical images while lossy compression (e.g., JPEG) is acceptable for web photographs.
| Media | Typical Capacity | Typical Access Time |
|---|---|---|
| RAM (DDR4) | 4 – 16 GB | ~10 ns |
| HDD (7200 rpm) | 500 GB – 2 TB | ~8 ms |
| SSD (NVMe) | 256 GB – 2 TB | ~0.1 ms |
| CD‑ROM | 700 MB | ~200 ms |
A school wants to archive 10 GB of student video projects. Recommend a storage solution and justify your choice considering capacity, cost and access speed.
Sending a 2 MB file over a 100 Mbps link (ignoring overhead) takes:
\(2 × 8 = 16 \text{Mbits} \; \Rightarrow \; 16 \text{Mbits} ÷ 100 \text{Mbps} = 0.16 \text{s}\).
Explain why fibre‑optic cables are preferred for long‑distance backbone networks, but copper cables are still common in home installations.
Input devices allow a user or the environment to supply data to a computer.
| Device | Physical Quantity / Data Captured | Typical Output Format | Common Uses |
|---|---|---|---|
| Keyboard | Alphanumeric key presses | Digital codes (ASCII / scan codes) | Text entry, command input |
| Mouse / Trackball / Touch‑pad | 2‑D position & button clicks | Digital coordinates (x, y) + binary button states | GUI navigation, drawing |
| Scanner | Optical image of a document/object | Bitmap (pixel array) | Digitising photos, OCR |
| Barcode / QR‑code Reader | Encoded numeric/alphanumeric data | Digital string | Retail checkout, inventory control |
| Digital Camera | Colour image (still/video) | RGB pixel data / video frames | Photography, computer vision |
| Microphone (Acoustic sensor) | Sound pressure level | Analog voltage → digital PCM samples | Voice recognition, audio recording |
| Touch‑screen (Resistive/Capacitive) | Contact location & pressure (optional) | Digital coordinates (x, y) ± pressure level | Smartphones, kiosks |
A sensor converts a physical quantity into an electrical signal.
| Sensor | Physical Quantity | Data Type | Typical Units | Example Applications |
|---|---|---|---|---|
| Thermistor / RTD / Thermocouple | Temperature | Analog → digital | °C, °F, K | Weather stations, HVAC, medical thermometers |
| Photodiode / LDR | Light intensity | Analog | Lux (lx) | Automatic lighting, camera exposure |
| Accelerometer | Linear acceleration | Digital (I²C/SPI) | m/s² | Smartphone orientation, crash detection |
| Gyroscope | Angular velocity | Digital | °/s | Drone stabilisation, gaming controllers |
| Barometric pressure sensor | Atmospheric / fluid pressure | Analog or Digital | Pa, hPa, atm | Weather forecasting, altitude measurement |
| Proximity sensor (IR, Ultrasonic) | Distance to an object | Digital (pulse‑width/PWM) | cm, mm | Obstacle avoidance, parking sensors |
| Microphone (Acoustic) | Sound pressure level | Analog → digital PCM | dB SPL | Voice assistants, audio recording |
| Capacitive touchscreen | Contact location & pressure | Digital (coordinates) | Pixels (x, y), pressure | Smartphones, tablets, kiosks |
| Flow sensor | Fluid flow rate | Analog or Digital | L/min, m³/s | Water‑metering, industrial process control |
| Gas / Humidity sensor | Gas concentration / relative humidity | Analog or Digital | ppm, %RH | Air‑quality monitoring, HVAC |
| Hall‑effect magnetic sensor | Magnetic flux density | Analog or Digital | µT, Gauss | Speed detection, digital compass |
| Moisture sensor | Soil or material moisture | Analog | % moisture | Agricultural monitoring, leak detection |
| pH sensor | Acidity/alkalinity of a solution | Analog (voltage ∝ pH) | pH units | Water‑treatment, laboratory analysis |
| Device | Data Presented | Typical Interface | Common Uses |
|---|---|---|---|
| LCD / LED display | Text, numbers, simple graphics | Parallel, I²C, SPI, HDMI | Instrument panels, calculators, smartphones |
| DLP / LCD projector | Full‑screen video or slides | HDMI, VGA, DisplayPort | Classroom presentations, digital signage |
| Speaker / Headphone | Audio waveform (digital PCM) | I²S, analog audio jack | Multimedia playback, alerts, voice output |
| Ink‑jet / Laser printer | Raster image or vector commands (PCL, PostScript) | USB, Ethernet, Wi‑Fi | Document printing, labels, photos |
| 3‑D printer (FDM, SLA) | Layer‑by‑layer extrusion commands (G‑code) | USB, SD card, Wi‑Fi | Prototyping, educational models |
| LED indicator | Binary status (on/off) | GPIO pin | Power status, error flags |
| Actuator (motor, servo, solenoid) | Mechanical motion or force | GPIO, PWM, driver circuit | Robotic arms, door locks, haptic feedback |
| Construct | Pseudocode Example | Flowchart Symbol |
|---|---|---|
| Assignment | temp ← temp + 1 | Rectangle |
| Input | READ score | Parallelogram |
| Output | PRINT "Pass" | Parallelogram |
| Decision | IF score ≥ 50 THEN … ELSE … ENDIF | Diamond |
| Loop (counter) | FOR i ← 1 TO 10 … NEXT i | Rectangle with curved edges |
IF…ELSE, WHILE, FOR.An array stores a collection of values of the same type, indexed from 0 (or 1) upwards.
DECLARE scores[5] AS INTEGER
FOR i ← 0 TO 4
READ scores[i]
NEXT i
File handling – opening, reading, writing and closing text or binary files.
SELECT name, grade FROM Students WHERE grade ≥ 80;
INSERT INTO Students (name, grade) VALUES ('Ali', 92);
UPDATE Students SET grade = 95 WHERE name = 'Ali';
DELETE FROM Students WHERE name = 'Ali';
| Operator | Symbol | Result |
|---|---|---|
| AND | ∧ | True only if both operands are true |
| OR | ∨ | True if at least one operand is true |
| NOT | ¬ | Inverts the truth value |
| XOR | ⊕ | True if exactly one operand is true |
Example: (temperature > 30) ∧ (fanOn = FALSE) → turn fan on.
Write pseudocode for a program that reads three test scores, calculates the average, and prints “Pass” if the average is ≥ 50, otherwise “Fail”.
A network of temperature sensors sends data via Wi‑Fi to a cloud server. The server stores readings in a database and provides a web dashboard. Discuss the advantages (real‑time monitoring, remote access) and potential drawbacks (security, power consumption).
Evaluate the impact of AI‑driven tutoring systems on traditional classroom teaching, considering benefits, ethical concerns and future developments.
A homeowner wants lights that turn on automatically when it gets dark and turn off when the room is empty. Choose suitable sensors, describe how they interact, and outline the control logic.
READ lightLevel FROM LDR
READ motion FROM PIR
IF lightLevel < 200 AND motion = TRUE THEN
TURN_ON lights
ELSE
TURN_OFF lights
ENDIF
Evaluate the use of soil moisture sensors connected to a solar‑powered microcontroller that controls irrigation valves. Consider accuracy, power, cost, scalability and environmental impact.
3F₂₁₆ to decimal. (AO1)Create an account or Login to take a Quiz
Log in to suggest improvements to this note.
Your 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.