AS CAIE Computer Science: Formula & Theorem Quick Reference Handbook | AS CAIE 计算机:公式定理速查手册

📚 AS CAIE Computer Science: Formula & Theorem Quick Reference Handbook | AS CAIE 计算机:公式定理速查手册

This handbook brings together the essential formulas, theorems and conversions you will encounter in the AS Level CAIE Computer Science course (9618). Use it to reinforce your understanding of data representation, logic circuits, networking and error detection, and to solve numerical problems with confidence.

本手册汇集了 AS Level CAIE 计算机科学 (9618) 课程中必需的核心公式、定理与转换关系。帮助你巩固数据表示、逻辑电路、网络与错误检测的知识,从容应对各类计算题。


1. Data Units and Conversions | 数据单位与转换

All digital data is stored and transmitted as bits (binary digits). A group of 8 bits forms a byte, which is the smallest addressable unit in most computer architectures. Larger quantities are expressed using binary prefixes, where each step up multiplies by 1024 (2¹⁰).

所有数字数据都以比特(二进制位)存储和传输。8 个比特组成一个字节,这也是大多数计算机体系结构中最小的可寻址单元。更大的数据量采用二进制前缀表示,每一级乘以 1024 (2¹⁰)。

When working with storage capacities and file sizes, remember that the binary prefixes (kibi, mebi, gibi) align with powers of 1024, while decimal prefixes (kilo, mega, giga) are sometimes encountered in hard disk marketing and refer to powers of 1000. In AS CAIE examinations, you will most often use the binary definitions for memory and file calculations.

在处理存储容量和文件大小时,请记住二进制前缀(kibi、mebi、gibi)基于 1024 的幂,而十进制前缀(kilo、mega、giga)偶尔见于硬盘宣传,指 1000 的幂。AS CAIE 考试中,大多数内存和文件计算采用二进制定义。

Unit Relationship 中文
1 byte 8 bits 1 字节 = 8 比特
1 KiB (kibibyte) 2¹⁰ bytes = 1024 bytes 1 KiB = 1024 字节
1 MiB (mebibyte) 2²⁰ bytes = 1 048 576 bytes 1 MiB = 2²⁰ 字节
1 GiB (gibibyte) 2³⁰ bytes 1 GiB = 2³⁰ 字节
1 TiB (tebibyte) 2⁴⁰ bytes 1 TiB = 2⁴⁰ 字节

A quick conversion rule: to move from a smaller binary unit to the next larger one, divide by 1024; to move down, multiply by 1024. Keep this in mind when estimating file sizes or transfer times.

快速转换法则:从较小的二进制单位升到下一级则除以 1024;降级则乘以 1024。在估算文件大小或传输时间时务必牢记。


2. Binary and Hexadecimal Conversions | 二进制与十六进制转换

Hexadecimal (base 16) provides a compact way to represent binary values. Each hex digit corresponds to a group of 4 bits (a nibble). This makes conversion straightforward: split the binary number into nibbles from the right, then replace each nibble with its hex equivalent.

十六进制(基数为16)是二进制值的紧凑表示形式。每一个十六进制数字对应 4 个二进制位(一个 nibble)。转换非常简单:从右端将二进制数按 4 位一组分割,再将每组替换为对应的十六进制符号。

For example, the binary number 11011010 is split into 1101 and 1010. 1101₂ equals D₁₆, and 1010₂ equals A₁₆, so the full hex value is DA₁₆. To convert hex to binary, reverse the process: replace each hex digit with exactly 4 bits.

例如,二进制数 11011010 分割为 1101 和 1010。1101₂ 即 D₁₆,1010₂ 即 A₁₆,因此完整的十六进制值为 DA₁₆。十六进制转二进制时只需反向操作:每个十六进制位用 4 个二进制位替换。

You must also be able to convert between binary/hex and decimal. For hex to decimal, multiply each digit by 16 raised to the power of its position (starting at 0 from the right) and sum the results. For binary to decimal, use powers of 2.

你还需要能在二进制/十六进制和十进制之间转换。十六进制转十进制:每位数字乘以 16 的位置次幂(从右起位置 0),然后求和。二进制转十进制则是乘以 2 的次幂。

Decimal = dₙ₋₁×16ⁿ⁻¹ + … + d₁×16¹ + d₀×16⁰


3. Two’s Complement and Integer Range | 补码与整数范围

Two’s complement is the standard method for representing signed integers in binary. For an n‑bit word, the most significant bit (MSB) is the sign bit: 0 for positive, 1 for negative. Positive numbers are stored in pure binary; negative numbers are obtained by inverting all bits of the positive magnitude and adding 1.

补码是二进制表示有符号整数的标准方法。对于 n 位字长,最高有效位(MSB)为符号位:0 表示正数,1 表示负数。正数以纯二进制存储;负数通过将对应正数的每一位取反再加 1 得到。

The range of values that can be represented with n‑bit two’s complement is always:

n 位补码能表示的数值范围总是:

Range = –2ⁿ⁻¹ to 2ⁿ⁻¹ – 1

For an 8‑bit representation, the range runs from –128 to +127. For 16 bits, it is –32 768 to 32 767. Understanding this range helps avoid overflow errors when performing arithmetic operations in a fixed word size.

以 8 位为例,范围从 –128 到 +127;16 位则是 –32 768 到 32 767。掌握该范围有助于避免定点字长下算术运算的溢出错误。


4. Image and Audio File Size Calculations | 图像与音频文件大小计算

Uncompressed bitmap images are defined by their pixel dimensions and colour depth (bit depth). The file size in bits is simply the product of width, height and colour depth. To express the result in bytes, divide by 8.

未压缩的位图图像由像素尺寸和颜色深度(位深度)决定。其文件大小(比特)为宽度、高度与颜色深度的乘积。若要以字节表示,则除以 8。

Image size (bits) = Width × Height × Colour Depth

For a 1920 × 1080 image with 24‑bit colour, the uncompressed size is 1920 × 1080 × 24 bits ≈ 49.77 Mbits, or about 6.22 MiB.

一幅 1920 × 1080、24 位颜色的图像,未压缩大小约为 1920 × 1080 × 24 比特 ≈ 49.77 Mbit,约 6.22 MiB。

Digital audio relies on sampling the sound wave at regular intervals. The bit rate (bits per second) is the product of the sample rate, the bit depth per sample, and the number of channels. The total file size is then bit rate times the duration in seconds.

数字音频依赖于以固定间隔对声波采样。比特率(bps)为采样率、每次采样位深度和声道数的乘积。文件总大小则为比特率乘以时长(秒)。

Bit rate = Sample rate × Bit depth × Number of channels

Audio file size (bits) = Bit rate × Duration (s)

For CD‑quality stereo audio (44.1 kHz, 16 bits, 2 channels), one minute of audio requires approximately 44 100 × 16 × 2 × 60 = 84 672 000 bits ≈ 10.09 MiB.

以 CD 音质立体声为例(44.1 kHz、16 位、2 声道),一分钟音频约需 44 100 × 16 × 2 × 60 = 84 672 000 比特 ≈ 10.09 MiB。


5. Data Compression Ratios | 数据压缩比

Compression reduces the size of a file for storage or transmission. The compression ratio compares the original size to the compressed size. It is often expressed as a ratio like 2:1 or as a simple fraction.

压缩可减少文件在存储或传输时的大小。压缩比用于比较原始大小与压缩后大小,常表示为 2:1 或简单分数。

Compression ratio = Original size ÷ Compressed size

A higher compression ratio means a smaller compressed file. If an original file of 800 KiB is compressed to 200 KiB, the compression ratio is 800 ÷ 200 = 4, often written as 4:1. You can also calculate the space saving percentage: ((original – compressed) ÷ original) × 100%. In the example, that is (600 ÷ 800) × 100% = 75%.

压缩比越高,压缩后的文件越小。若原始 800 KiB 文件压缩至 200 KiB,压缩比为 800 ÷ 200 = 4,常写作 4:1。还可计算空间节省百分比:((原始 – 压缩) ÷ 原始) × 100%,本例为 75%。

Remember that lossless compression allows perfect reconstruction of the original data, while lossy compression discards some information to achieve higher ratios and is common in images, audio and video.

请记住,无损压缩能完全还原原始数据;有损压缩则丢失部分信息以获得更高压缩比,广泛用于图像、音频和视频。


6. Network Performance Metrics | 网络性能指标

When transferring data across a network, the time taken depends on the size of the data and the available transmission rate. The fundamental relationship is:

数据在网络中传输时,所需时间取决于数据量和可用传输速率。最基本的公式为:

Transmission time = Data volume (bits) ÷ Transmission rate (bps or bits per second)

Care must be taken with units. File sizes are often given in bytes or KiB, while network speeds are in bits per second. Convert the file size into bits before dividing: multiply bytes by 8, and multiply KiB by 1024 × 8.

务必注意单位。文件大小常以字节或 KiB 计,而网络速度以 bps 表示。相除前需将文件大小转为比特:字节乘以 8,KiB 乘以 1024 × 8。

Throughput is the actual amount of useful data transferred per unit time, usually lower than the theoretical bandwidth due to protocol overheads and congestion. Latency (propagation delay) adds an extra delay that depends on distance and the speed of the signal in the medium, though it is often less significant for large bulk transfers than the transmission time.

吞吐量指单位时间内实际传输的有效数据量,因协议开销和拥塞通常低于理论带宽。延迟(传播时延)取决于距离和介质中信号的传播速度,在大文件传输中往往不如传输时间那么显著。


7. Logic Gates and Boolean Algebra Laws | 逻辑门与布尔代数定律

Boolean algebra underpins digital circuit design. The basic operations are AND (•), OR (+) and NOT ( ‘ ). Logic gates implement these operations physically. Knowing the fundamental laws allows you to simplify logic expressions and reduce the number of gates required.

布尔代数是数字电路设计的基础。基本运算为 与 (•)、或 (+) 和 非 ( ‘ ),逻辑门则物理上实现这些运算。掌握基本定律使你能够简化逻辑表达式,减少所需门电路数量。

Commutative law: A + B = B + A and A • B = B • A.

交换律:A + B = B + A,A • B = B • A。

Associative law: (A + B) + C = A + (B + C) and (A • B) • C = A • (B • C).

结合律:(A + B) + C = A + (B + C),(A • B) • C = A • (B • C)。

Distributive law: A • (B + C) = (A • B) + (A • C) and A + (B • C) = (A + B) • (A + C).

分配律:A • (B + C) = (A • B) + (A • C), A + (B • C) = (A + B) • (A + C)。

Identity law: A + 0 = A

Published by TutorHao | AS 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课程辅导,国外大学本科硕士研究生博士课程论文辅导

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