📚 Year 7 CIE Computer Science Formula & Theorem Quick Reference | 7年级 CIE 计算机:公式定理速查手册
This quick reference handbook collects all the essential formulas, theorems, and key facts that Year 7 students need to master for the CIE Computer Science curriculum. From binary conversion and logic gates to data storage calculations and algorithm analysis, every topic is presented in clear English with matching Chinese explanations. Keep this guide handy for revision, homework, and exam preparation.
本速查手册汇集了7年级CIE计算机课程必备的公式、定理和关键知识点。从二进制转换、逻辑门到数据存储计算和算法分析,每个主题均以清晰的英文配以对应的中文讲解。请将本手册用于复习、作业和备考,随时查阅。
1. Number Systems: Binary & Decimal | 数制:二进制与十进制
The base of a number system tells us how many unique digits are used. In decimal (base 10), digits are 0–9. In binary (base 2), only 0 and 1 are used. Each position in a binary number carries a place value that is a power of 2.
数制的基数表明使用了多少个不同数字。十进制(基数为10)使用0–9。二进制(基数为2)仅使用0和1。二进制数中每一位的位权是2的幂。
Binary to decimal: multiply each bit by 2ⁿ, where n is the position from the right starting at 0, then sum the results.
二进制转十进制:每一位乘以2ⁿ(n为从右起由0开始的位置),然后求和。
Decimal Value = bₙ×2ⁿ + bₙ₋₁×2ⁿ⁻¹ + … + b₁×2¹ + b₀×2⁰
Example: 1101₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13₁₀
示例:1101₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13₁₀
Decimal to binary: repeatedly divide the decimal number by 2, recording the remainders. The binary number is obtained by reading the remainders backwards from last to first.
十进制转二进制:反复除以2并记录余数,逆序读取余数得到二进制数。
13 ÷ 2 = 6 rem 1 → 6 ÷ 2 = 3 rem 0 → 3 ÷ 2 = 1 rem 1 → 1 ÷ 2 = 0 rem 1 → 1101₂
2. Binary Addition | 二进制加法
Binary addition follows four basic rules. When the sum of bits in a column reaches 2 (10₂), a carry of 1 is generated to the next higher column.
二进制加法遵循四条基本规则。当某列之和达到2(即10₂)时,产生一个进位1到下一列。
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 0, carry 1 to the next column (10₂)
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 0,并向下一列进1(10₂)
When adding three 1s in one column (e.g., 1+1+carry1), the result is 1 and a carry of 1 (11₂).
当一列有三个1相加(如1+1+进位1),结果为1且进位为1(即11₂)。
1 + 1 + 1 = 11₂ (sum bit 1, carry 1)
3. Signed Binary: Two’s Complement | 有符号二进制:补码表示
Two’s complement is used to represent both positive and negative integers in binary. The most significant bit (MSB) acts as the sign bit: 0 for positive, 1 for negative. For an n-bit number, the range is -2ⁿ⁻¹ to 2ⁿ⁻¹ – 1.
补码用于表示正负整数。最高位(MSB)为符号位:0表示正,1表示负。对n位二进制数,取值范围为-2ⁿ⁻¹ 到 2ⁿ⁻¹ – 1。
To negate a number: flip all bits (find one’s complement) and add 1 to the least significant bit.
求负数的方法:将所有位取反(求反码),然后在最低位加1。
Find -6 in 8-bit: +6 = 0000 0110 → flip → 1111 1001 → add 1 → 1111 1010
To convert a two’s complement number to decimal: if MSB is 0, treat as unsigned; if MSB is 1, compute -(2ᵏ – value), where k is number of bits, or negate to positive and apply minus sign.
转换补码为十进制:若MSB为0,当作无符号数;若MSB为1,计算-(2ᵏ – 值),或取负得到正数再加负号。
4. Logic Gates and Truth Tables | 逻辑门与真值表
Basic logic gates perform Boolean operations on one or more binary inputs to produce a single output. The primary gates studied in Year 7 are NOT, AND, OR, NAND, NOR, and XOR.
基本逻辑门对一个或多个二进制输入执行布尔运算,产生单一输出。7年级学习的主要门有NOT、AND、OR、NAND、NOR和XOR。
| Gate | Symbolic Expression | Output when |
|---|---|---|
| NOT | Q = ¬A | Q = 1 if A = 0 |
| AND | Q = A · B | Q = 1 if A=1 and B=1 |
| OR | Q = A + B | Q = 1 if at least one input is 1 |
| NAND | Q = ¬(A · B) | Q = 0 only if A=1 and B=1 |
| NOR | Q = ¬(A + B) | Q = 1 only if both inputs are 0 |
| XOR | Q = A ⊕ B | Q = 1 if inputs are different |
Each gate can be described fully by a truth table listing all input combinations and corresponding outputs.
每种门都可以通过列出所有输入组合及对应输出的真值表来完整描述。
5. Boolean Algebra Laws | 布尔代数定律
Boolean algebra provides a set of rules to simplify logic expressions. The fundamental laws are used to reduce the number of gates in a circuit.
布尔代数提供了一系列简化逻辑表达式的规则,用于减少电路中的门数量。
- Commutative Law: A+B = B+A, A·B = B·A
- Associative Law: (A+B)+C = A+(B+C), (A·B)·C = A·(B·C)
- Distributive Law: A·(B+C) = A·B + A·C
- Identity: A+0 = A, A·1 = A
- Nullity: A+1 = 1, A·0 = 0
- Idempotent: A+A = A, A·A = A
- Complement: A + ¬A = 1, A·¬A = 0
- Double Negation: ¬(¬A) = A
- De Morgan’s Laws: ¬(A·B) = ¬A + ¬B, ¬(A+B) = ¬A·¬B
- 交换律:A+B = B+A,A·B = B·A
- 结合律:(A+B)+C = A+(B+C),(A·B)·C = A·(B·C)
- 分配律:A·(B+C) = A·B + A·C
- 恒等律:A+0 = A,A·1 = A
- 零一律:A+1 = 1,A·0 = 0
- 幂等律:A+A = A,A·A = A
- 互补律:A + ¬A = 1,A·¬A = 0
- 双重否定:¬(¬A) = A
- 德摩根定律:¬(A·B) = ¬A + ¬B,¬(A+B) = ¬A·¬B
De Morgan’s laws are especially useful for converting between NAND and NOR gates and for simplifying logic circuits.
德摩根定律在转换NAND与NOR门以及简化逻辑电路中特别有用。
6. Units of Data Storage | 数据存储单位
Computer storage is measured using a binary scale. The basic unit is the bit (binary digit). 8 bits form 1 byte. Larger units follow powers of 2.
计算机存储按二进制尺度衡量。基本单位是比特(bit)。8个比特组成1字节(Byte)。更大单位遵循2的幂次。
| Unit | Abbreviation | Size (bytes) | Power of 2 |
|---|---|---|---|
| Kilobyte | KB | 1,024 | 2¹⁰ |
| Megabyte | MB | 1,048,576 | 2²⁰ |
| Gigabyte | GB | 1,073,741,824 | 2³⁰ |
| Terabyte | TB | 1,099,511,627,776 | 2⁴⁰ |
To convert between units, multiply or divide by 1,024. For example, 2 GB = 2 × 1024 MB = 2048 MB.
单位换算:乘以或除以1024。例如2 GB = 2 × 1024 MB = 2048 MB。
n GB = n × 1024 MB; n MB = n × 1024 KB; n KB = n × 1024 bytes
7. Image File Size Calculation | 图像文件大小计算
The size of a bitmap image depends on the resolution (width × height in pixels) and colour depth (bits per pixel). The formula is:
位图图像的大小取决于分辨率(宽×高,以像素计)和颜色深度(每像素比特数)。公式为:
File Size (bits) = Width × Height × Colour Depth
Convert to bytes by dividing by 8, then to larger units by dividing by 1024. A 400 × 300 image with 24-bit colour depth: size = 400 × 300 × 24 = 2,880,000 bits = 360,000 bytes ≈ 351.6 KB.
转换为字节需除以8,再通过除以1024转为更大单位。一张400×300、24位颜色的图片:大小 = 400 × 300 × 24 = 2,880,000比特 = 360,000字节 ≈ 351.6 KB。
Colour depth determines the number of distinct colours: 2^depth. For example, 8-bit gives 256 colours, 24-bit gives over 16 million.
颜色深度决定了可表示的颜色数:2^深度。例如8位可表示256种颜色,24位可表示超过1600万种颜色。
8. Sound File Size and Sampling | 声音文件大小与采样
Digital audio file size depends on sample rate (samples per second), bit depth, number of channels, and duration. The formula:
数字音频文件大小取决于采样率(每秒采样数)、位深度、声道数和时长。公式:
File Size (bits) = Sample Rate × Bit Depth × Channels × Duration (seconds)
For example, CD-quality audio: 44,100 Hz × 16 bits × 2 (stereo) × 60 s = 84,672,000 bits ≈ 10.1 MB.
例如CD音质:44,100 Hz × 16位 × 2(立体声) × 60秒 = 84,672,000比特 ≈ 10.1 MB。
Higher sample rates and bit depths capture sound more accurately but produce larger files. Nyquist theorem states the sample rate must be at least twice the highest frequency to avoid distortion.
更高的采样率和位深度能更精确地捕捉声音,但产生更大的文件。奈奎斯特定理指出,为避免失真,采样率至少应为最高频率的两倍。
9. ASCII and Unicode | ASCII 与 Unicode
ASCII uses 7 or 8 bits to represent characters, providing codes for 128 or 256 characters respectively. The uppercase ‘A’ is 65, ‘a’ is 97. The formula to derive a numeric character digit ‘0’–’9′ from its ASCII code:
ASCII使用7或8位表示字符,分别提供128或256个编码。大写’A’为65,‘a’为97。从ASCII码获取数字字符的值:
Numeric value = ASCII code – 48
Unicode extends ASCII to support international languages, emojis, and symbols, using various encodings like UTF-8 (variable-width). The first 128 Unicode code points match ASCII for backward compatibility.
Unicode扩展了ASCII,支持国际语言、表情符号和符号,采用UTF-8等变长编码。前128个码点与ASCII一致,保持向后兼容。
UTF-8 encoding rules for characters beyond U+007F use multiple bytes; this is examined in later years but the concept of a universal character set is introduced in Year 7.
超出U+007F的字符使用UTF-8多字节编码规则,这在后续年级学习,但通用字符集的概念已在7年级引入。
10. Redundancy and Error Checking | 数据冗余与错误检查
Parity checking is a simple method to detect single-bit errors. An extra bit (parity bit) is added to a byte so that the total number of 1s is even (even parity) or odd (odd parity).
奇偶校验是一种检测单比特错误的简单方法。在字节上添加一个额外的校验位,使得1的总数为偶数(偶校验)或奇数(奇校验)。
Even parity: number of 1s (including parity bit) is even.
If a byte 1011000 is to be sent with even parity, count of 1s = 3 (odd), so parity bit = 1 to make total 4 (even). The transmitted byte becomes 10110001.
例如,要传输字节1011000并用偶校验:1的个数为3(奇数),设校验位为1使总数为4(偶数)。传输字节为10110001。
Parity can only detect an odd number of bit errors; it cannot correct them. More advanced techniques like checksums and CRC are introduced later.
奇偶校验只能检测奇数个比特错误,无法纠正。更高级的校验和、循环冗余校验(CRC)等技术在以后介绍。
11. Flowchart Symbols & Algorithm Basics | 流程图符号与算法基础
Algorithms are step-by-step procedures for solving problems. They are often represented using flowcharts. Key symbols:
算法是解决问题的分步过程,常用流程图表示。关键符号:
- Oval: Start/End
- Rectangle: Process or instruction
- Diamond: Decision (yes/no)
- Parallelogram: Input/Output
- Arrow: flow direction
- 椭圆形:开始/结束
- 矩形:处理或指令
- 菱形:判断(是/否)
- 平行四边形:输入/输出
- 箭头:流程方向
A common algorithm taught is the linear search algorithm. Its efficiency can be explained by the maximum number of comparisons needed.
常见的教学算法是线性搜索。其效率可由所需的最大比较次数解释。
Max comparisons = n, where n is the number of items in the list.
Binary search requires a sorted list and has a maximum number of comparisons proportional to log₂(n), but this is explored in later years.
二分搜索需要有序列表,最大比较次数与log₂(n)成正比,但此内容在后续年级深入学习。
12. Computational Thinking: Decomposition & Pattern Recognition | 计算思维:分解与模式识别
Computational thinking involves breaking down complex problems (decomposition), identifying patterns, abstracting general principles, and designing algorithms. There are no strict formulas, but problem-solving strategies often use the following approach:
计算思维包括分解复杂问题、识别模式、抽象一般原则和设计算法。虽无严格公式,但解题策略常遵循:
- Decompose the problem into smaller, manageable parts.
- Look for patterns or similarities with previously solved problems.
- Remove unnecessary details (abstraction).
- Create a step-by-step solution (algorithm).
- 将问题分解为更小、可管理的部分。
- 寻找模式或与已解问题的相似性。
- 去除不必要的细节(抽象)。
- 建立逐步解决方案(算法)。
This is a higher-order skill assessed through problem-solving questions in the exam, requiring application rather than memorisation of facts.
这是通过考试中解决问题型题目来评估的高阶技能,重在应用而非死记硬背。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导