IGCSE计算机 核心笔记
IG CS是一门比较难的学科,因为它的内容非常抽象,只能通过想象进行理解。生活中的例子都没法完美类比CS中的许多概念。而当这些概念需要用英文进行应答时,就会变得更加困难。
学习时建议先确保自己对于概念充分理解,一定要多花时间进行基本框架的构建,然后再使用标准的英语进行解释和定义,记背是必不可少的。这样才能在答题时得到高分。
Course Progress Tracker
1. Data Representation
Section titled “1. Data Representation”1.1 Number Systems
Section titled “1.1 Number Systems”Think of computers as really simple machines that only understand two things: electricity on or off. That’s why binary (just 0s and 1s) is perfect for them. But here’s the thing - humans aren’t great at reading long strings of 0s and 1s. That’s where hexadecimal comes in as our “translator.”
Why Binary?
Number System Basics
Section titled “Number System Basics”Here’s how these three number systems relate:
| System | Base | Digits | Common Use |
|---|---|---|---|
| Denary | 10 | 0-9 | What humans naturally use |
| Binary | 2 | 0-1 | What computers naturally use |
| Hexadecimal | 16 | 0-9, A-F | Human-friendly representation of binary |
Click to flip • Press Space or Enter
Converting Between Number Systems
Section titled “Converting Between Number Systems”Denary to Binary - Think about place values!
Convert Denary to Binary
Binary to Denary - Just add up the place values where you see a 1!
Convert Binary to Denary
Binary ↔ Hexadecimal - The easy one!
Hexadecimal is just a shorthand for binary. Group binary digits into chunks of 4 (nibbles), since
Binary to Hex Conversion
Click to flip • Press Space or Enter
Denary to Hexadecimal - Use division!
Denary to Hex
Binary Arithmetic
Section titled “Binary Arithmetic”Binary Addition follows the same rules as denary, but simpler!
Binary Addition Rules
Binary Addition
Logical Binary Shifts - A clever shortcut for multiplication and division by powers of 2.
Click to flip • Press Space or Enter
Click to flip • Press Space or Enter
Left Shift Practice
Two’s Complement - Representing Negative Numbers
Section titled “Two’s Complement - Representing Negative Numbers”Computers need to store negative numbers too. Two’s complement is the clever system they use.
Understanding Two's Complement
Converting Negative Denary to Two’s Complement:
Two's Complement Conversion
Click to flip • Press Space or Enter
1.2 Text, Sound and Images
Section titled “1.2 Text, Sound and Images”Everything in a computer - words, music, photos - is ultimately just numbers in binary. Here’s how that magic happens:
Text Representation
Section titled “Text Representation”Click to flip • Press Space or Enter
| Character Set | Bits per Character | Total Characters | What It Includes |
|---|---|---|---|
| ASCII | 7 bits | 128 | Basic English letters, numbers, symbols |
| Unicode | 16-32 bits | 100,000+ | All languages, emojis, special symbols |
Sound Representation
Section titled “Sound Representation”Sound waves are continuous (analog), but computers are digital. To convert sound to digital:
Sound Digitization
The Quality Trade-off:
| Factor | Higher Value | Result |
|---|---|---|
| Sample Rate | More samples/second | Better accuracy, larger file |
| Sample Resolution | More bits/sample | More precise amplitude, larger file |
Click to flip • Press Space or Enter
Image Representation
Section titled “Image Representation”Images are made of pixels (picture elements) arranged in a grid.
Image Properties
Calculate Image File Size
1.3 Data Storage and Compression
Section titled “1.3 Data Storage and Compression”Storage Units - The Computer’s Measuring System
Section titled “Storage Units - The Computer’s Measuring System”| Unit | Size | Remember This |
|---|---|---|
| Bit | 1 binary digit | Smallest unit |
| Nibble | 4 bits | One hex digit |
| Byte | 8 bits | One ASCII character |
| Kibibyte (KiB) | 1024 bytes | |
| Mebibyte (MiB) | 1024 KiB | |
| Gibibyte (GiB) | 1024 MiB | |
| Tebibyte (TiB) | 1024 GiB |
Click to flip • Press Space or Enter
File Size Calculations
Section titled “File Size Calculations”Image File Size:
Sound File Size:
Sound File Calculation
Data Compression
Section titled “Data Compression”Files can be huge. Compression makes them smaller so they’re faster to send and take up less space.
Two Types of Compression
Lossless Compression: Run Length Encoding (RLE)
Instead of storing repeated values, store: value + count.
RLE Practice
Lossy Compression
| Method | What It Does | Used For |
|---|---|---|
| MP3 Audio | Removes frequencies humans can’t hear well | Music streaming |
| JPEG Images | Reduces colour depth and resolution slightly | Photos on websites |
2. Data Transmission
Section titled “2. Data Transmission”2.1 Types and Methods of Data Transmission
Section titled “2.1 Types and Methods of Data Transmission”When you send data over the internet, it doesn’t go as one big chunk. Think of it like sending a long letter - you break it into pages, mail them separately, and reassemble them at the destination.
Packet Structure
Section titled “Packet Structure”What's in a Packet?
Click to flip • Press Space or Enter
Packet Switching
Section titled “Packet Switching”Routers direct packets along the network, and each packet might take a different route. They arrive potentially out of order, then get reassembled at the destination. Brilliant!
Serial vs Parallel Transmission
Section titled “Serial vs Parallel Transmission”| Type | How It Works | Advantages | Disadvantages | Used For |
|---|---|---|---|---|
| Serial | Bits sent one after another over one wire | Reliable over long distances | Slower | USB, Ethernet, long distances |
| Parallel | Multiple bits sent simultaneously over multiple wires | Faster over short distances | Data can desynchronise (skew) over distance | Inside CPU, old printer cables |
Click to flip • Press Space or Enter
Simplex, Half-Duplex, and Full-Duplex
Section titled “Simplex, Half-Duplex, and Full-Duplex”Think about conversations:
| Mode | Data Flow | Real-Life Example | Technical Use |
|---|---|---|---|
| Simplex | One direction only | Radio broadcast (you only listen) | Sensor → Monitor |
| Half-Duplex | Both directions, but one at a time | Walkie-talkie (take turns speaking) | - |
| Full-Duplex | Both directions simultaneously | Phone call (can interrupt each other) | Broadband internet |
USB Interface
Section titled “USB Interface”Why USB is Everywhere
2.2 Methods of Error Detection
Section titled “2.2 Methods of Error Detection”Things can go wrong during transmission - electrical interference, loose cables, cosmic rays (seriously!). We need ways to detect errors.
Parity Check - The Simple Approach
Section titled “Parity Check - The Simple Approach”Add an extra bit to make the total number of 1s either always even or always odd.
Even Parity
More Robust Methods
Section titled “More Robust Methods”| Method | How It Works | Strength |
|---|---|---|
| Checksum | Calculate a value from all the data (e.g., sum of bytes), send it along | Detects multiple errors better than parity |
| Echo Check | Receiver sends data back, sender compares | Very reliable but doubles transmission time |
| Check Digit | Special digit calculated from others using an algorithm | Used in barcodes, ISBNs |
Click to flip • Press Space or Enter
Automatic Repeat Query (ARQ) - Error Correction
Section titled “Automatic Repeat Query (ARQ) - Error Correction”This is the full protocol for guaranteeing error-free transmission:
ARQ Protocol Steps
2.3 Encryption
Section titled “2.3 Encryption”Imagine sending a postcard versus sending a sealed letter. Encryption is like that sealed envelope - it scrambles data so only the intended recipient can read it.
Symmetric Encryption
Section titled “Symmetric Encryption”Click to flip • Press Space or Enter
Pros: Fast, efficient
Cons: How do you securely share the key in the first place? That’s the key distribution problem!
Asymmetric Encryption
Section titled “Asymmetric Encryption”The clever solution: use two different keys!
Public & Private Keys
Understanding Asymmetric Encryption
3. Hardware
Section titled “3. Hardware”3.1 Computer Architecture
Section titled “3.1 Computer Architecture”The Central Processing Unit (CPU)
Section titled “The Central Processing Unit (CPU)”The CPU is the “brain” of the computer - it processes all instructions and data. Every calculation, every decision, every operation goes through here.
Click to flip • Press Space or Enter
Von Neumann Architecture Components
Section titled “Von Neumann Architecture Components”These components work together in a beautiful choreographed dance to execute programs:
Registers (tiny, super-fast storage inside the CPU):
| Register | Full Name | What It Stores |
|---|---|---|
| PC | Program Counter | Address of the next instruction |
| MAR | Memory Address Register | Address in RAM being accessed right now |
| MDR | Memory Data Register | Data being transferred to/from RAM |
| CIR | Current Instruction Register | Instruction currently being decoded/executed |
| ACC | Accumulator | Results of calculations from ALU |
Processing Units:
CPU Core Components
Buses (highways for data inside the computer):
| Bus | Carries | Direction |
|---|---|---|
| Address Bus | Memory addresses | CPU → RAM (one-way) |
| Data Bus | Actual data/instructions | Both ways (two-way) |
| Control Bus | Control signals (read, write, clock) | Both ways (two-way) |
Click to flip • Press Space or Enter
The Fetch-Decode-Execute (FDE) Cycle
Section titled “The Fetch-Decode-Execute (FDE) Cycle”This happens billions of times per second in your computer. Every single instruction goes through these three stages:
FDE Cycle Steps
Detailed FDE Steps:
FETCH:
- PC holds the address of next instruction
- Copy address from PC to MAR (via Address Bus)
- Instruction at that address copied into MDR (via Data Bus)
- Instruction from MDR copied to CIR
- PC incremented (points to next instruction)
DECODE: 6. CU decodes the instruction in CIR (Is it ADD? LOAD? JUMP?)
EXECUTE: 7. CU sends control signals to execute the instruction 8. ALU performs operation if needed, stores result in ACC
Trace the FDE Cycle
What Makes a CPU Faster?
Section titled “What Makes a CPU Faster?”Performance Factors
Click to flip • Press Space or Enter
Instruction Set
Section titled “Instruction Set”Click to flip • Press Space or Enter
Different CPUs can have different instruction sets (like different languages). That’s why a program compiled for an Intel CPU might not work on an ARM CPU.
Embedded Systems
Section titled “Embedded Systems”Not all computers are PCs! Many devices have specialized computers inside them.
Embedded Systems Characteristics
Examples:
- Washing machines (control cycles and timing)
- Cars (Engine Management System, ABS, airbags)
- Digital cameras (image processing)
- Smart home devices (thermostats, security cameras)
- Microwave ovens (timing and power control)