9618 Paper 1 โ AS Theory
1Data Representation
1.1 Number systems
Computers store all data as binary (base 2). Humans group binary into hexadecimal (base 16) because each hex digit maps to exactly 4 bits, making long binary strings readable.
| Decimal | Binary | Hex |
|---|---|---|
| 0โ9 | 0000โ1001 | 0โ9 |
| 10 | 1010 | A |
| 15 | 1111 | F |
| 255 | 1111 1111 | FF |
1.2 Binary Coded Decimal (BCD)
Each decimal digit (0โ9) is encoded in 4 bits independently. The number 47 in BCD is 0100 0111, not 00101111. Used where decimal accuracy matters (calculators, currency).
1.3 Negative numbers โ two's complement
The most significant bit becomes the sign bit with a negative place value. In 8-bit two's complement the range is โ128 to +127.
Example: โ5 in 8 bits
+5 = 0000 0101 โ flip โ 1111 1010 โ +1 โ 1111 10111.4 Characters โ ASCII and Unicode
- ASCII: 7 bits, 128 characters. Fine for English, no support for accents or non-Latin scripts.
- Unicode (UTF-8 / UTF-16): variable length up to 4 bytes; covers every writing system; first 128 codepoints coincide with ASCII for backward compatibility.
1.5 Images and sound
Bitmap images store a colour value for every pixel.
Vector images store drawing instructions (lines, curves, fills). Scale without loss but unsuitable for photographs.
Sound is captured by sampling amplitude at regular intervals.
2Communication
2.1 Transmission mode & direction
- Serial: one bit at a time over one wire. Reliable over long distances. (USB, Ethernet)
- Parallel: multiple bits simultaneously over multiple wires. Fast over short distances; suffers from skew over long ones.
- Simplex: one direction only (TV broadcast).
- Half-duplex: both directions, not simultaneously (walkie-talkie).
- Full-duplex: both directions simultaneously (phone call).
2.2 Network topologies
| Topology | Pros | Cons |
|---|---|---|
| Star | Failure of one node doesn't bring down the network | Central switch is a single point of failure |
| Bus | Cheap, simple | One break breaks everything |
| Mesh | Highly resilient (multiple paths) | Expensive, complex routing |
2.3 The Internet, protocols, IPs
The Internet is a network of networks using the TCP/IP suite. Each connected device has an IP address; humans use domain names resolved by DNS.
- IPv4: 32 bits, ~4.3 billion addresses (running out).
- IPv6: 128 bits, effectively unlimited.
- HTTP / HTTPS: web pages. HTTPS adds TLS encryption.
- FTP: file transfer.
- SMTP / POP3 / IMAP: email send / receive.
3Hardware
3.1 Logic gates
| Gate | Symbol notation | Output is 1 whenโฆ |
|---|---|---|
| AND | A ยท B | both inputs are 1 |
| OR | A + B | at least one input is 1 |
| NOT | ฤ | input is 0 |
| NAND | (A ยท B)' | NOT both inputs are 1 |
| NOR | (A + B)' | both inputs are 0 |
| XOR | A โ B | inputs differ |
3.2 Primary memory
- RAM โ volatile, holds running programs and data. Two flavours: SRAM (cache, fast, expensive), DRAM (main memory, slower, denser).
- ROM โ non-volatile, holds firmware (e.g. BIOS, bootloader).
3.3 Secondary & off-line storage
| Medium | How it stores | Examples |
|---|---|---|
| Magnetic | Magnetised regions on a spinning platter | HDD, magnetic tape |
| Optical | Pits and lands read by a laser | CD, DVD, Blu-ray |
| Solid-state | Floating-gate transistors | SSD, USB drive, SD card |
4Processor Fundamentals
4.1 CPU components
- ALU โ Arithmetic Logic Unit. Performs arithmetic and bitwise operations.
- CU โ Control Unit. Decodes instructions and orchestrates the other components.
- Registers โ small ultra-fast storage. Key ones: PC, MAR, MDR, CIR, ACC, SR.
- Buses โ Address bus (one-way), Data bus (two-way), Control bus (carries signals).
4.2 The fetchโexecute cycle
- Fetch: PC โ MAR; memory[MAR] โ MDR; MDR โ CIR; PC = PC + 1.
- Decode: CU interprets the opcode in CIR.
- Execute: the operation is carried out; result may go to ACC or back to memory.
4.3 Interrupts
An interrupt is a signal that interrupts the current cycle: at the end of each fetch, the CPU checks the interrupt register. If set, it saves state (PC, registers) on the stack, jumps to the ISR (interrupt service routine), then restores state on return.
4.4 Assembly language
One mnemonic per machine instruction. Addressing modes you must know:
| Mode | Operand meansโฆ |
|---|---|
| Immediate | The actual value (e.g. LDM #5) |
| Direct | The address that holds the value (LDD 100) |
| Indirect | The address that holds the address (LDI 100) |
| Indexed | Address = base + index register (LDX 100) |
5System Software
5.1 Operating-system functions
- Memory management (allocation, paging, virtual memory).
- Process management (scheduling, multitasking).
- File management (directories, permissions).
- Device management (drivers, I/O).
- Security & user accounts.
- The user interface (GUI / CLI).
5.2 Utility programs
Disk defragmenter, file compression, anti-virus, backup. Strictly OS support but distinct from the kernel.
5.3 Translators
| Type | Behaviour | Use |
|---|---|---|
| Compiler | Translates the whole program once โ executable. | Production builds. |
| Interpreter | Translates and runs line-by-line. | Scripting, interactive use. |
| Assembler | Translates assembly โ machine code. | Low-level programming. |
6Security, Privacy & Data Integrity
6.1 Threats
- Malware โ viruses, worms, trojans, ransomware, spyware.
- Phishing & pharming โ social-engineering attacks.
- Hacking โ unauthorised access for theft, vandalism, or sabotage.
6.2 Defences
- Strong passwords, 2FA, biometrics.
- Firewalls, anti-malware, encryption.
- Regular patching and user training.
6.3 Data validation vs verification
| Validation | Verification |
|---|---|
| Checks data is reasonable: range check, type check, length check, format check, presence check, check digit. | Checks data has been copied accurately: double-entry, visual check, parity bit, checksum. |
7Ethics & Ownership
- Copyright โ automatic legal protection of original works; covers expression, not ideas.
- Patent โ granted for novel inventions; lasts ~20 years; must be applied for.
- Open source โ source code released under a licence permitting reuse and modification (MIT, GPL, Apache).
- Free software (FSF definition) โ the four freedoms: use, study, share, modify.
- Professional ethics โ codes of conduct from BCS / ACM. Recurring themes: honesty, competence, privacy, public benefit.
8Databases
8.1 The relational model
- Entity โ a thing the database stores (Student, Book).
- Attribute โ a property of an entity (Name, ISBN).
- Primary key โ uniquely identifies a row.
- Foreign key โ a primary key from another table, creating a relationship.
8.2 Normalisation
| Form | Rule |
|---|---|
| 1NF | No repeating groups; each cell holds a single atomic value. |
| 2NF | 1NF, and every non-key attribute depends on the whole primary key. |
| 3NF | 2NF, and no transitive dependencies (non-key attributes depend only on the key). |
8.3 SQL โ DDL & DML basics
CREATE TABLE Student (
StudentID INTEGER PRIMARY KEY,
Name VARCHAR(50) NOT NULL,
ClassID INTEGER,
FOREIGN KEY (ClassID) REFERENCES Class(ClassID)
);
SELECT Name FROM Student WHERE ClassID = 1 ORDER BY Name;
INSERT INTO Student VALUES (42, 'Lin', 1);
UPDATE Student SET ClassID = 2 WHERE StudentID = 42;
DELETE FROM Student WHERE StudentID = 42;