Formulae & Key Facts Quick Reference for Year 10 Cambridge Computer Science | 剑桥Year 10计算机科学公式定理速查手册

📚 Formulae & Key Facts Quick Reference for Year 10 Cambridge Computer Science | 剑桥Year 10计算机科学公式定理速查手册

This quick reference guide summarises the essential formulae, conversion methods, and logical rules you need for the Year 10 Cambridge Computer Science syllabus. Keep it handy when revising data representation, logic, algorithms, and networking.

本速查手册总结了剑桥Year 10计算机科学课程必须掌握的核心公式、转换方法及逻辑规则。在复习数据表示、逻辑、算法和网络等内容时可随身查阅。


1. Data Units and Conversion Factors | 数据单位与换算因数

A bit (b) is the smallest unit of data, representing a binary digit 0 or 1. A byte (B) consists of 8 bits.

比特(bit, b)是数据的最小单位,表示一个二进制数字0或1。一个字节(Byte, B)由8个比特组成。

Common multiples in computing use binary prefixes: 1 kibibyte (KiB) = 2¹⁰ bytes = 1024 B; 1 mebibyte (MiB) = 2²⁰ B; 1 gibibyte (GiB) = 2³⁰ B. Note that 1 kB (kilobyte) often refers to 1000 bytes in some contexts.

计算中常用倍数使用二进制前缀:1千比字节(KiB) = 2¹⁰ 字节 = 1024 B;1兆比字节(MiB) = 2²⁰ B;1吉比字节(GiB) = 2³⁰ B。注意,1 kB (千字节)在某些上下文中通常指1000字节。


2. Number Bases: Binary, Denary, Hexadecimal | 数制:二进制、十进制与十六进制

To convert a binary number to denary, add the place values where a ‘1’ appears. For example, 1011₂ = 1·2³ + 0·2² + 1·2¹ + 1·2⁰ = 8 + 0 + 2 + 1 = 11₁₀. To convert denary to binary, repeatedly divide by 2 and read the remainders in reverse order.

将二进制数转换为十进制时,将出现“1”的位权值相加。例如,1011₂ = 1·2³ + 0·2² + 1·2¹ + 1·2⁰ = 8 + 0 + 2 + 1 = 11₁₀。将十进制转换为二进制,则反复除以2并逆序读取余数。

Hexadecimal (base 16) uses digits 0–9 and letters A–F (with A=10, B=11, …, F=15). Each hex digit corresponds to exactly 4 bits. Example: 2F (hex) = 2×16 + 15 = 47₁₀. To convert binary to hex, group bits into nibbles of 4 from the right.

十六进制(基数为16)使用数字0~9和字母A~F(A=10,B=11,…,F=15)。每个十六进制位恰好对应4个比特。例如:2F(hex) = 2×16 + 15 = 47₁₀。将二进制转换为十六进制时,从右向左每4个比特为一组。


3. Negative Numbers: Sign & Magnitude, Two’s Complement | 负数表示:原码、反码与补码

Two’s complement is the standard method for representing signed integers. For an n-bit number, the most significant bit (MSB) is the sign bit: 0 for positive, 1 for negative. The range is –2ⁿ⁻¹ to 2ⁿ⁻¹ – 1. To obtain the two’s complement of a number, invert all bits and add 1.

二进制补码是表示有符号整数的标准方法。对于n位二进制数,最高位(MSB)为符号位:0表示正,1表示负。数值范围为 –2ⁿ⁻¹ 到 2ⁿ⁻¹ – 1。求一个数的补码时,将所有位取反后加1。


4. Sound & Image File Size Calculations | 声音与图像文件大小计算

Image file size can be estimated by multiplying the image dimensions, colour depth, and number of frames (if applicable). For a single uncompressed image:

图像文件大小可通过图片尺寸、颜色位深和帧数(如果有)相乘来估算。对单幅未压缩图像:

Image size (bits) = width (pixels) × height (pixels) × colour depth (bits per pixel)

For uncompressed sound, the formula is:

对于未压缩音频,公式为:

Sound size (bits) = sample rate (Hz) × bit depth × number of channels × duration (s)

Remember to convert the result into bytes (÷8) and then into KiB or MiB as needed, using the binary factors.

记住,根据需要使用二进制因数将结果转换为字节(÷8),再转换为KiB或MiB。


5. Logic Gates & Their Truth Tables | 逻辑门及其真值表

The fundamental logic gates are AND, OR, NOT, NAND, NOR, and XOR. The table below shows the truth tables (A and B are inputs; Q is the output).

基本逻辑门包括AND、OR、NOT、NAND、NOR和XOR。下表显示了它们的真值表(A和B为输入,Q为输出)。

A B AND OR NAND NOR XOR
0 0 0 0 1 1 0
0 1 0 1 1 0 1
1 0 0 1 1 0 1
1 1 1 1 0 0 0

NOT gate simply inverts the input: when A=0, Q=1; when A=1, Q=0.

NOT门直接反转输入:当A=0时Q=1;当A=1时Q=0。


6. Boolean Algebra Laws & Simplification | 布尔代数定律与化简

Boolean algebra helps simplify logic expressions. Key identities and laws include the commutative, associative, distributive, and absorption laws. Two critical theorems are De Morgan’s laws:

布尔代数有助于化简逻辑表达式。关键恒等式和定律包括交换律、结合律、分配律和吸收律。其中最重要的两个定理是德摩根定律:

(A + B)’ = A’ · B’

(A · B)’ = A’ + B’

These laws are frequently used to convert between sum-of-products and product-of-sums forms, or to remove overbars that span multiple terms.

这些定律常被用来在“积之和”与“和之积”形式间转换,或消除跨越多项的取反号。


7. Network Transmission Time | 网络传输时间

When a file is transmitted over a network, the time required depends on the file size and the bandwidth of the connection. Both must be in consistent units (usually bits and bits per second).

在网络上传输文件时,所需时间取决于文件大小和连接的带宽。两者单位必须一致(通常为比特和比特/秒)。

Transmission time (s) = File size (bits) ÷ Bandwidth (bps)

Convert larger file sizes: 1 KiB = 8 × 1024 bits, 1 MiB = 8 × 1024² bits, and so on. Always check whether the bandwidth is given in bps, kbps, or Mbps.

文件大小换算:1 KiB = 8×1024 bits,1 MiB = 8×1024² bits,依此类推。请注意带宽单位是bps、kbps还是Mbps。


8. Error Detection: Parity & Checksums | 错误检测:奇偶校验与校验和

Even parity ensures that the total number of 1-bits in a data word (including the parity bit) is even. Odd parity makes the total odd. The parity bit is calculated as the XOR of all data bits for even parity. A single-bit error will cause a parity mismatch.

偶校验保证数据字(含校验位)中1比特的总数为偶数。奇校验使总数为奇数。偶校验时,校验位等于所有数据位的异或(XOR)。单个比特的错误将导致校验失配。

Checksums are arithmetic sums of data bytes sent along with the data. The receiver calculates its own checksum and compares; a mismatch indicates an error.

校验和是对数据字节的算术和,随数据一起发送。接收方计算自己的校验和并比较,不一致则表示出错。


9. Searching Algorithms: Linear & Binary Search | 搜索算法:线性搜索与二分搜索

Linear search checks each element in sequence. In the worst case, it requires n comparisons for a list of n items. It works on unsorted data.

线性搜索按顺序检查每个元素。对包含n个项的列表,最坏情况下需要n次比较。它适用于未排序的数据。

Binary search requires a sorted list. It repeatedly divides the search interval in half. The maximum number of comparisons is ⌈log₂ n⌉. For n = 1000, at most about 10 comparisons are needed.

二分搜索要求列表已排序。它反复将搜索区间一分为二。最大比较次数为 ⌈log₂ n⌉。当n=1000时,大约最多需要10次比较。


10. Sorting Algorithms Overview | 排序算法概述

Bubble sort works by repeatedly stepping through the list, comparing adjacent elements and swapping them if they are in the wrong order. The worst-case number of comparisons and swaps is approximately n(n – 1)/2. Best case (already sorted) requires only n–1 comparisons with no swaps if a ‘sorted’ flag is used.

冒泡排序通过反复遍历列表,比较相邻元素并在顺序错误时交换。最坏情况下的比较和交换次数约为 n(n – 1)/2。最好情况(已排序)若使用“已排序”标志,仅需 n–1 次比较且无交换。

Insertion sort builds a sorted list one element at a time, taking each item from the unsorted part and inserting it into the correct position. Its worst-case comparisons are also about n²/2, but it performs well on nearly sorted data.

插入排序每次从未排序部分取出一个元素,并插入到已排序部分的正确位置,从而逐步构建有序列表。其最坏情况下的比较次数也约为 n²/2,但在数据接近有序时表现良好。


Published by TutorHao | Computer Science Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

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

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

Exit mobile version