📚 AS AQA Computer Science: Formula & Theorem Quick Reference Guide | AS AQA 计算机:公式定理速查手册
This quick reference guide compiles the key formulas, laws, and theorems required for the AS AQA Computer Science specification (7516/7517). It covers Boolean algebra, De Morgan’s theorems, data representation formulas, algorithm complexity, compression, encryption, and error detection. Use this handbook to reinforce your understanding and perform quick checks during revision.
本速查手册汇编了 AS AQA 计算机科学课程(7516/7517)所需的关键公式、定律和定理。内容涵盖布尔代数、德摩根定理、数据表示公式、算法复杂度、压缩、加密及错误检测。使用本手册加深理解,并在复习时快速查阅。
1. Boolean Algebra Laws | 布尔代数定律
Boolean algebra operates on binary variables and is fundamental to digital logic design. The laws below allow you to simplify and manipulate logic expressions. Every variable can take the value 0 or 1, and the operators are AND ( · ), OR ( + ), and NOT ( ¬ ).
布尔代数处理二进制变量,是数字逻辑设计的基础。以下定律可用于化简和变换逻辑表达式。每个变量取值 0 或 1,运算符为与 ( · )、或 ( + ) 和非 ( ¬ )。
| Law | AND Form | OR Form |
|---|---|---|
| Identity | A · 1 = A | A + 0 = A |
| Null / Annulment | A · 0 = 0 | A + 1 = 1 |
| Idempotent | A · A = A | A + A = A |
| Complement | A · ¬A = 0 | A + ¬A = 1 |
| Commutative | A · B = B · A | A + B = B + A |
| Associative | (A · B) · C = A · (B · C) | (A + B) + C = A + (B + C) |
| Distributive | A · (B + C) = (A · B) + (A · C) | A + (B · C) = (A + B) · (A + C) |
| Absorption | A · (A + B) = A | A + (A · B) = A |
| Double Negation | ¬(¬A) = A | |
These identities can be proved using truth tables. They form the building blocks for circuit simplification and conversion between logic gate types.
这些恒等式可通过真值表证明。它们是电路化简和逻辑门类型转换的基石。
2. De Morgan’s Theorems | 德摩根定理
De Morgan’s theorems express the negation of an AND or OR expression in terms of the negated inputs. They are essential for converting circuits to use only NAND or NOR gates.
德摩根定理用非量输入表达了与非或或非表达式。这些定理对于将电路转换为仅使用与非门或或非门至关重要。
¬(A · B) = ¬A + ¬B
¬(A + B) = ¬A · ¬B
The first theorem states that the negation of an AND is the OR of the negations. The second states that the negation of an OR is the AND of the negations. These extend to more than two variables:
第一条定理指出与的非等于非量的或;第二条指出或的非等于非量的与。这些定理可推广至多个变量:
¬(A · B · C) = ¬A + ¬B + ¬C
¬(A + B + C) = ¬A · ¬B · ¬C
3. Simplifying Logic Expressions | 逻辑表达式化简技巧
Apart from applying laws directly, certain derived rules speed up simplification. The absorption laws and redundancy laws are especially useful.
除直接应用定律外,某些推导出的规则可加速化简。吸收律和冗余律尤其有用。
Key identities for simplification:
关键化简恒等式:
- A + (¬A · B) = A + B
A 或 (非A 与 B) 等于 A 或 B - A · (¬A + B) = A · B
A 与 (非A 或 B) 等于 A 与 B - (A · B) + (A · ¬B) = A
(A 与 B) 或 (A 与 非B) 等于 A - (A + B) · (A + ¬B) = A
(A 或 B) 与 (A 或 非B) 等于 A
When simplifying, always aim to reduce the number of gates and literals. Try factoring, expanding, and applying complements. Practice with truth table verification ensures correctness.
化简时,始终以减少门数量和文字数量为目标。尝试提取因子、展开和应用互补律。通过真值表验证确保正确性。
4. Number Systems & Conversions | 数制与转换
Understanding binary, hexadecimal and two’s complement is vital for data representation topics. The formulas below cover conversions and the representable range for signed integers.
理解二进制、十六进制和二进制补码对数据表示专题至关重要。以下公式涵盖转换以及有符号整数的表示范围。
Decimal to binary: repeatedly divide the decimal number by 2, recording remainders. The binary number is the remainders read from bottom to top.
十进制转二进制:反复将十进制数除以 2,记录余数。从下往上读取余数即为二进制。
Hexadecimal to binary: each hex digit corresponds to a 4-bit binary nibble. E.g. A₁₆ = 1010₂, F₁₆ = 1111₂.
十六进制转二进制:每个十六进制数字对应一个 4 位二进制半字节。例如 A₁₆ = 1010₂,F₁₆ = 1111₂。
Two’s complement range for n bits:
−2ⁿ⁻¹ ≤ value ≤ 2ⁿ⁻¹ − 1
where n is the number of bits. For 8 bits, the range is −128 to 127.
其中 n 为比特数。对于 8 位,范围为 −128 至 127。
Negative number in two’s complement: invert all bits of the positive magnitude, then add 1.
二进制补码负数表示:将正数绝对值的每一位取反,然后加 1。
5. Image and Sound File Size Calculations | 图像与声音文件大小计算
File size estimation is a frequent exam topic. Use the following formulas, remembering to convert bits to bytes when required (1 byte = 8 bits).
文件大小估算是常见考点。使用以下公式,并记得在需要时将比特转换为字节(1 字节 = 8 比特)。
Image file size (bytes):
File size = (Width × Height × Colour Depth) ÷ 8
Colour depth is the number of bits per pixel. For example, a 500 × 300 image with 24-bit colour depth gives (500 × 300 × 24) ÷ 8 = 450,000 bytes ≈ 450 kB.
颜色深度是每像素的比特数。例如,500×300 图像采用 24 位颜色深度,文件大小 = (500 × 300 × 24) ÷ 8 = 450,000 字节 ≈ 450 kB。
Sound file size (bytes):
File size = (Sample rate × Sample depth × Duration × Number of channels) ÷ 8
Sample rate is in Hz, sample depth in bits, duration in seconds. For stereo sound (2 channels), CD-quality (44,100 Hz, 16 bits) for 60 seconds: (44100 × 16 × 60 × 2) ÷ 8 = 10,584,000 bytes ≈ 10.1 MB.
采样率单位为 Hz,采样深度单位为比特,时长单位为秒。对于立体声(2 声道),CD 品质(44 100 Hz,16 比特)持续 60 秒:大小 = (44100 × 16 × 60 × 2) ÷ 8 = 10 584 000 字节 ≈ 10.1 MB。
6. Data Transmission & Storage Units | 数据传输与存储单位
Transmission time and storage sizes are linked by bit rates and unit prefixes. Be aware of the difference between decimal (10³) and binary (2¹⁰) prefixes.
传输时间与存储大小通过比特率和单位前缀关联。注意十进制 (10³) 与二进制 (2¹⁰) 前缀的区别。
Transmission time:
Time (seconds) = Data size (bits) ÷ Bit rate (bps)
Rearrange to find bit rate: Bit rate = Data size ÷ Time.
变换可得比特率:比特率 = 数据大小 ÷ 时间。
Common prefixes (decimal): kilo (k) = 10³, mega (M) = 10⁶, giga (G) = 10⁹.
Binary prefixes (IEC): kibi (Ki) = 2¹⁰ = 1024, mebi (Mi) = 2²⁰, gibi (Gi) = 2³⁰.
常见十进制前缀:千 (k) = 10³,兆 (M) = 10⁶,吉 (G) = 10⁹。
二进制前缀(IEC):千二进制 (Ki) = 2¹⁰ = 1024,兆二进制 (Mi) = 2²⁰,吉二进制 (Gi) = 2³⁰。
The specification expects you to convert between units fluently, so memorise these multipliers.
课程大纲要求熟练转换单位,请牢记这些乘数。
7. Algorithm Complexity (Big O Notation) | 算法复杂度(大O表示法)
Big O notation describes the upper bound of an algorithm’s time or space requirements as the input size grows. The table below gives the time complexity of standard AS-level search and sort algorithms.
大O表示法描述了输入规模增长时算法时间或空间需求的上界。下表给出了AS阶段标准搜索与排序算法的时间复杂度。
| Algorithm | Best Case | Average Case | Worst Case |
|---|---|---|---|
| Linear Search | O(1) | O(n) | 更多咨询请联系16621398022(同微信)
CommentsMore posts |
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply