Pre-U WJEC Computer Science: Formula & Theorem Quick Reference | Pre-U WJEC 计算机:公式定理速查手册

📚 Pre-U WJEC Computer Science: Formula & Theorem Quick Reference | Pre-U WJEC 计算机:公式定理速查手册

This comprehensive quick reference handbook brings together the essential formulae, theorems, and analytical tools required for the Pre-U WJEC Computer Science course. From Boolean logic and data representation to algorithm complexity and network delay, every key concept is presented in a clear, at-a-glance format with paired explanations in both English and Chinese. Use this guide to reinforce your understanding, revise effectively, and approach your examinations with confidence.

这本综合速查手册汇集了 Pre-U WJEC 计算机科学课程必备的公式、定理和分析工具。从布尔逻辑、数据表示到算法复杂度与网络延迟,每一个核心概念都以清晰、一目了然的形式呈现,并配有中英双语解释。利用本指南来巩固理解、高效复习,自信应对考试。


1. Boolean Algebra Laws | 布尔代数基本定律

The foundation of digital logic, Boolean algebra provides a set of rules for manipulating logical expressions. These laws are used to simplify circuits and conditions in programming.

数字逻辑的基础——布尔代数提供了一套操作逻辑表达式的规则。这些定律用于简化电路和编程中的条件语句。

A ∧ B = B ∧ A

Commutative Law for AND: the order of operands does not affect the result.

与运算交换律:操作数的顺序不影响结果。

A ∨ B = B ∨ A

Commutative Law for OR holds similarly.

或运算交换律同样成立。

(A ∧ B) ∧ C = A ∧ (B ∧ C)

Associative Law for AND permits regrouping of operands.

与运算结合律允许操作数重新分组。

A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C)

Distributive Law of AND over OR mirrors the distributive property in ordinary algebra.

与对或的分配律类似于普通代数中的分配律。

A ∨ (A ∧ B) = A

Absorption Law simplifies expressions by eliminating redundant terms.

吸收律通过消除冗余项来简化表达式。

A ∨ ¬A = 1

Complement Law: a variable OR its negation always yields true.

互补律:一个变量与其否定进行或运算总为真。


2. De Morgan’s Theorems | 德摩根定理

De Morgan’s theorems are crucial for transforming and simplifying negated expressions, especially when implementing circuits with universal gates.

德摩根定理对于变换和简化取反表达式至关重要,特别是在使用通用门实现电路时。

¬(A ∧ B) = ¬A ∨ ¬B

The negation of an AND is the OR of the negations. This allows conversion between gate types.

与运算的否定等于各否定的或。这使得门类型之间可以相互转换。

¬(A ∨ B) = ¬A ∧ ¬B

The negation of an OR is the AND of the negations. Both forms are equally fundamental.

或运算的否定等于各否定的与。这两种形式同等重要。


3. Karnaugh Map Simplification | 卡诺图化简

Karnaugh maps (K-maps) provide a visual method for minimising Boolean expressions, grouping adjacent cells that differ in only one variable.

卡诺图提供了一种最小化布尔表达式的可视化方法,将仅有一个变量不同的相邻格组合在一起。

Adjacent cells: mᵢ and mⱼ differ by exactly one bit

Groups of 2ⁿ adjacent 1s can be combined, eliminating n variables from the product term.

2ⁿ 个相邻的 1 可以合并为一组,从乘积项中消除 n 个变量。

Overlapping and wrapping groups are allowed; always aim to include the largest possible groups to achieve the simplest Sum of Products.

允许重叠和环绕式分组;始终力求包含尽可能大的组,以获得最简与或式。


4. Number Systems & Conversions | 数制与转换

Understanding binary, decimal, and hexadecimal conversions is essential for data representation and low-level programming.

理解二进制、十进制和十六进制转换对于数据表示和底层编程至关重要。

Decimal to binary: repeated division by 2, record remainders

十进制转二进制:反复除以 2,记录余数。

Binary to hexadecimal: group bits in fours from the right

二进制转十六进制:从右往左每四位分成一组。

n-bit value range: 0 to 2ⁿ − 1 (unsigned)

n 位无符号数的取值范围:0 到 2ⁿ − 1。

Two’s complement range: −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1

二进制补码取值范围:−2ⁿ⁻¹ 到 2ⁿ⁻¹ − 1,用于表示有符号整数。


5. Data Storage: Image & Sound File Size | 数据存储:图像与声音文件大小

Calculating file sizes is a practical skill for understanding storage requirements and data transmission.

计算文件大小是理解存储需求和数据传输的一项实用技能。

Image file size (bytes) = (width px × height px × bit depth) ÷ 8

图像文件大小(字节)=(宽度像素 × 高度像素 × 位深度)÷ 8。如果使用索引色,还要考虑调色板。

Sound file size (bytes) = sample rate (Hz) × bit depth × duration (s) × channels ÷ 8

音频文件大小(字节)= 采样率(Hz)× 位深度 × 时长(秒)× 声道数 ÷ 8。未压缩格式如 WAV 直接适用此式。

Add metadata overhead where specified, but most exam questions focus on raw data calculation.

有时需加上元数据开销,但大多数考试题目仅要求计算原始数据大小。


6. Network Transmission: Transfer Time & Delay | 网络传输:传输时间与延迟

Networking formulae quantify how long data takes to travel across a medium and through devices.

网络公式用于量化数据在介质中传输和通过设备所需的时间。

Transmission time = Data size (bits) ÷ Bandwidth (bps)

传输时间 = 数据量(比特)÷ 带宽(比特/秒)。这是将数据推入链路所需的时间。

Propagation delay = Distance (m) ÷ Propagation speed (m/s)

传播延迟 = 距离(米)÷ 传播速度(米/秒)。通常电信号在铜线中约为 2×10⁸ m/s。

Total delay = Transmission + Propagation + Queuing + Processing

总延迟 = 传输时延 + 传播时延 + 排队时延 + 处理时延。分析网络性能时必须考虑所有组成部分。


7. Big O Notation & Algorithm Analysis | 大O表示法与算法分析

Big O notation describes the upper bound of an algorithm’s running time or space requirements as the input size grows.

大O表示法描述了随输入规模增长,算法运行时间或空间需求的上界。

f(n) = O(g(n)) if ∃ c>0, n₀ such that f(n) ≤ c·g(n) for all n ≥ n₀

形式化定义:存在正常数 c 和 n₀,使得对所有 n ≥ n₀ 都有 f(n) ≤ c·g(n)。

Common complexity classes: O(1) constant, O(log n) logarithmic, O(n) linear, O(n log n) linearithmic, O(n²) quadratic, O(2ⁿ) exponential.

常见复杂度类别:O(1) 常数,O(log n) 对数,O(n) 线性,O(n log n) 线性对数,O(n²) 平方,O(2ⁿ) 指数。

Also use Ω for lower bound and Θ for tight bound. In Pre-U, focus lies mainly on O and Θ.

Ω 表示下界,Θ 表示紧确界。在 Pre-U 中主要关注 O 和 Θ。


8. Sorting Algorithms Complexity | 排序算法复杂度

Sorting algorithms are a classic context for complexity analysis. Memorising their best, average, and worst-case performance is vital.

排序算法是复杂度分析的经典场景。记住它们的最佳、平均和最坏情况性能至关重要。

  • Bubble Sort: O(n) best (already sorted), O(n²) average, O(n²) worst.

    冒泡排序:最佳 O(n)(已排序),平均 O(n²),最坏 O(n²)。

  • Insertion Sort: O(n) best, O(n²) average/worst; efficient for small or nearly sorted data.

    插入排序:最佳 O(n),平均/最坏 O(n²);对小规模或接近有序的数据高效。

  • Merge Sort: O(n log n) in all cases; requires O(n) auxiliary space.

    归并排序:所有情况均为 O(n log n);需要 O(n) 辅助空间。

  • Quick Sort: O(n log n) average, O(n²) worst (rare with good pivot choice); typically in-place.

    快速排序:平均 O(n log n),最坏 O(n²)(好的基准选择可避免);通常为原地排序。

  • Heap Sort: O(n log n) in all cases, O(1) additional space but not stable.

    堆排序:所有情况 O(n log n),O(1) 额外空间但不是稳定排序。


9. Searching Algorithms | 搜索算法

Searching techniques vary dramatically in efficiency depending on whether the data structure is ordered or indexed.

搜索技术的效率根据数据结构是否有序或是否建立索引而有显著差异。

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading