📚 Year 12 WJEC Computer Science: Quick Reference Formula & Theorem Handbook | WJEC 计算机 AS 公式定理速查手册
This handbook compiles the essential formulae, theorems and conversion rules you need to memorise for the Year 12 WJEC Computer Science examination. Each topic is presented as a concise English–Chinese pair, with key results highlighted in bold and illustrated through tables where helpful. Use it to boost your last‑minute revision and to double‑check your understanding of the core numerical and logical principles.
本手册汇集了 Year 12 WJEC 计算机科学考试必须记忆的核心公式、定理和转换规则。每个主题均以简洁的英中配对形式呈现,关键结论用粗体突出,并配有易于查阅的表格。适合用于考前冲刺复习,帮助你巩固对计算机底层数值与逻辑原理的理解。
1. Number Systems & Conversions | 数制与转换
A number written in base r can be expanded as the sum of each digit multiplied by the corresponding power of r. For a binary number, r = 2, and each bit position has a weight 2i. The same principle applies to decimal (r = 10) and hexadecimal (r = 16), where letters A–F represent 10–15.
以基数 r 表示的数可以展开为每位数字与对应 r 的幂的乘积之和。对于二进制数,r = 2,每个位权为 2i。同样的原则也适用于十进制(r = 10)和十六进制(r = 16),其中字母 A–F 分别表示 10–15。
Value = Σ dₖ · rᵏ
值 = Σ dₖ · rᵏ
Conversion shortcuts:
- Binary → Hexadecimal: group bits into nibbles (4 bits) from the right, then convert each group.
- Hexadecimal → Binary: replace each hex digit with a 4‑bit binary equivalent (0 → 0000, 1 → 0001, …, F → 1111).
- Decimal → Binary: repeatedly divide by 2, read remainders from bottom to top.
转换捷径:
- 二进制 → 十六进制:从右起每 4 个比特分为一组,然后转换每组。
- 十六进制 → 二进制:每个十六进制数字用 4 位二进制替代(0 → 0000,1 → 0001,…,F → 1111)。
- 十进制 → 二进制:重复除以 2,余数从下往上读取。
| 0 | 0000 | 4 | 0100 | 8 | 1000 | C | 1100 |
| 1 | 0001 | 5 | 0101 | 9 | 1001 | D | 1101 |
| 2 | 0010 | 6 | 0110 | A | 1010 | E | 1110 |
| 3 | 0011 | 7 | 0111 | B | 1011 | F | 1111 |
2. Two’s Complement | 二补码表示法
In two’s complement, the most significant bit (MSB) holds a negative weight: –2ⁿ⁻¹ for an n‑bit word. The other bits have the usual positive powers of two. This gives an n‑bit integer range of:
在二补码表示法中,最高有效位(MSB)具有负权重:对于 n 位字,其权重为 -2ⁿ⁻¹。其余位保留正常的正权值。因此 n 位整数的表示范围为:
–2ⁿ⁻¹ ≤ N ≤ 2ⁿ⁻¹ – 1
Finding the two’s complement of a negative number –X:
- Write the positive binary for +X on n bits.
- Invert all bits (find the one’s complement).
- Add 1 to the least significant bit.
求负数 –X 的二补码:
- 写出 +X 的 n 位二进制表示。
- 将所有位取反(得反码)。
- 在最低有效位上加 1。
Equivalently, the two’s complement of –X is the binary value of 2ⁿ – X.
等价地,–X 的二补码就是 2ⁿ – X 的二进制值。
Overflow detection: when adding two numbers with the same sign, the result has the opposite sign, i.e. carry into the sign bit differs from carry out.
溢出检测:当两个同号数相加时,结果的符号相反,即进入符号位的进位与出符号位的进位不同。
Overflow = Cₙ ⊕ Cₙ₋₁
3. Floating-Point Binary (Normalised Form) | 浮点二进制(规格化形式)
A floating-point number is stored as mantissa × 2exponent. In the WJEC AS specification, the mantissa is typically a fixed‑point two’s complement fraction, and the exponent is a two’s complement (or excess‑biased) integer. Normalisation ensures that the mantissa starts with 01 for positive numbers and 10 for negative numbers, maximising precision.
浮点数存储为 尾数 × 2指数。在 WJEC AS 大纲中,尾数通常为二补码定点小数,指数为二补码(或偏移码)整数。规格化保证了正数尾数以 01 开头,负数尾数以 10 开头,从而最大化精度。
For a normalised floating-point representation with bias K, the value in decimal is:
对于偏差为 K 的规格化浮点表示,十进制值为:
Value = (–1)ˢ × (1·M) × 2E – Bias
值 = (–1)ˢ × (1·M) × 2E – Bias
Example (IEEE-754 single precision): 1 sign bit, 8 biased exponent bits (bias 127), 23 mantissa bits. The leading 1 of the mantissa is not stored (hidden bit).
示例(IEEE-754 单精度):1 位符号、8 位偏移指数(偏移量 127)、23 位尾数。尾数的前置 1 不存储(隐藏位)。
4. Boolean Algebra Laws | 布尔代数定律
Boolean algebra simplifies logic circuits and expressions. The following identities are fundamental.
Published by TutorHao | Year 12 Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导