GCSE AQA Computer Science: Formula Summary Handbook | GCSE AQA 计算机:公式汇总手册

📚 GCSE AQA Computer Science: Formula Summary Handbook | GCSE AQA 计算机:公式汇总手册

This handbook brings together every key formula and calculation you need to succeed in the AQA GCSE Computer Science (8525) examination. From working out image and sound file sizes to simplifying Boolean expressions and calculating check digits, these formulas are presented with clear explanations, practical examples, and paired English–Chinese content to support bilingual revision.

本手册汇总了你在 AQA GCSE 计算机科学 (8525) 考试中获得成功所需的每一个关键公式和计算。从计算图像和声音文件大小,到化简布尔表达式和计算校验位,这些公式都配有清晰的解释、实用示例,并以中英对照的形式呈现,助力双语复习。


1. Image File Size | 图像文件大小

An uncompressed bitmap image’s file size is determined by its resolution and colour depth. The total number of pixels is multiplied by the number of bits used to represent the colour of each pixel.

Image File Size (bits) = Width (pixels) × Height (pixels) × Colour Depth (bits per pixel)

未压缩的位图图像文件大小由其分辨率和颜色深度决定。总像素数乘以表示每个像素颜色所用的位数。

For example, a 1024 × 768 image with a 24‑bit colour depth would require 1024 × 768 × 24 = 18,874,368 bits. To convert to bytes, divide by 8: 2,359,296 bytes, which is approximately 2.36 MB (using 1 MB = 1,000,000 bytes).

例如,一幅 1024 × 768、颜色深度为 24 位的图像需要 1024 × 768 × 24 = 18,874,368 位。若要转换为字节,则除以 8,得到 2,359,296 字节,约合 2.36 MB(设 1 MB = 1,000,000 字节)。


2. Sound File Size | 声音文件大小

Digital sound recording creates a file whose size depends on the sampling rate, the bit depth (sample resolution), the number of channels, and the duration of the recording.

Sound File Size (bits) = Sample Rate (Hz) × Sample Resolution (bits) × Number of Channels × Duration (s)

数字录音所生成文件的大小取决于采样率、位深度(样本分辨率)、声道数量以及录音时长。

For instance, a 10‑second stereo recording (2 channels) sampled at 44.1 kHz with 16‑bit resolution yields: 44,100 × 16 × 2 × 10 = 14,112,000 bits, which is 1,764,000 bytes or about 1.76 MB. Higher sample rates and resolutions produce more accurate sound but demand more storage.

例如,一段 10 秒、以 44.1 kHz 采样、16 位分辨率录制的立体声(2 个声道)产生:44,100 × 16 × 2 × 10 = 14,112,000 位,即 1,764,000 字节,约合 1.76 MB。更高的采样率和分辨率能产生更精确的声音,但需要更多存储空间。


3. Text File Size | 文本文件大小

Text files store characters using a predefined character set. The total size in bits is the number of characters multiplied by the number of bits used to encode each character.

Text File Size (bits) = Number of Characters × Bits per Character

文本文件使用预定义的字符集存储字符。总位数等于字符数乘以每个字符编码所用的位数。

Common encodings include ASCII (7 bits per character, typically stored as 1 byte) and Unicode (often 16 bits per character in UCS‑2/UTF‑16). For a document containing 2,000 characters in ASCII, the file size would be roughly 2,000 bytes, whereas the same text stored as 16‑bit Unicode would require 4,000 bytes.

常见编码包括 ASCII(每字符 7 位,通常存储为 1 字节)和 Unicode(在 UCS‑2/UTF‑16 中常为每字符 16 位)。对于一份包含 2,000 个字符且采用 ASCII 编码的文档,文件大小大约为 2,000 字节,而同样的文本若以 16 位 Unicode 存储,则需要 4,000 字节。


4. Storage Unit Conversions | 存储单位换算

Data quantities are measured in bits and bytes, scaling up by factors of 1,000 (or sometimes 1,024). For the AQA GCSE specification, decimal prefixes (powers of 10) are used unless stated otherwise.

1 byte = 8 bits
1 KB (kilobyte) = 1,000 bytes
1 MB (megabyte) = 1,000 KB
1 GB (gigabyte) = 1,000 MB
1 TB (terabyte) = 1,000 GB

数据量以位和字节计量,并按 1,000(有时为 1,024)的倍数递增。在 AQA GCSE 规格中,除非另有说明,均使用十进制前缀(10 的幂)。

To convert from bits to bytes, divide by 8; from bytes to kilobytes, divide by 1,000, and so on. Always check the context of the question – some problems might explicitly use the binary definition (1 KiB = 1,024 bytes), but the standard exam expectation is decimal.

将位转换为字节,除以 8;将字节转换为千字节,除以 1,000,以此类推。务必注意题目语境——有些问题可能明确使用二进制定义(1 KiB = 1,024 字节),但考试的标准预期是十进制。


5. Data Transfer Time | 数据传输时间

The time taken to transmit a file over a network is calculated by dividing the file size by the transfer rate. Ensure consistent units before performing the calculation.

Transfer Time (s) = Data Size (bits) / Transfer Rate (bits per second)

通过网络传输文件所需的时间,通过将文件大小除以传输速率来计算。计算前请确保单位一致。

If a 100 MB file needs to be uploaded via a connection with a 20 Mbps upload speed, first convert the file size to megabits: 100 MB = 100 × 8 = 800 Mb. Then divide: 800 Mb / 20 Mbps = 40 seconds. Remember that network speeds are often quoted in bits per second, while file sizes are given in bytes.

若需通过上传速度为 20 Mbps 的连接上传一个 100 MB 的文件,首先将文件大小转换为兆位:100 MB = 100 × 8 = 800 Mb。然后相除:800 Mb ÷ 20 Mbps = 40 秒。请记住,网络速率通常以每秒位数表示,而文件大小常以字节给出。


6. Compression Ratio | 压缩比

Compression reduces file size. The compression ratio compares the original size to the compressed size, while the space saving percentage indicates how much storage has been freed.

Compression Ratio = Uncompressed Size / Compressed Size
Space Saving (%) = ( (Uncompressed Size – Compressed Size) / Uncompressed Size ) × 100

压缩可减小文件大小。压缩比比较原始大小与压缩后的大小,而空间节省百分比则表示释放了多少存储空间。

For a file originally 50,000 bytes that shrinks to 12,500 bytes after compression, the compression ratio is 50,000 / 12,500 = 4:1. The space saved is ((50,000 – 12,500) / 50,000) × 100 = 75%. Lossless compression achieves this without losing any information, while lossy compression sacrifices some quality for higher ratios.

对于一个原始大小为 50,000 字节、压缩后缩小为 12,500 字节的文件,压缩比为 50,000 ÷ 12,500 = 4:1。空间节省率为 ((50,000 – 12,500) ÷ 50,000) × 100 = 75%。无损压缩在实现这一比例时不丢失任何信息,而有损压缩则以牺牲部分质量为代价,获得更高的压缩比。


7. Binary Addition and Overflow | 二进制加法与溢出

Binary addition follows simple rules. When two bits are added, a carry may be generated. Overflow occurs when the result of an addition exceeds the maximum value that can be stored in the allocated number of bits.

Addition rules:
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0, carry 1
1 + 1 + 1 (carry in) = 1, carry 1

二进制加法遵循简单的规则。当两个位相加时,可能产生进位。当加法结果超出分配给它的位数所能存储的最大值时,便发生溢出。

For example, adding the 8‑bit binary numbers 11110000 (240) and 00110011 (51) produces 1 00100011 (291), but only 8 bits are available, so the result wraps to 00100011 (35) and the overflow flag is set. In signed two’s complement, overflow can be detected by checking if the carry into the most significant bit differs from the carry out.

例如,将两个 8 位二进制数 11110000(240)和 00110011(51)相加,得到 1 00100011(291),但仅有 8 位可用,因此结果回绕至 00100011(35),并置位溢出标志。在有符号二进制补码中,可以通过检测进入最高有效位的进位与从最高有效位输出的进位是否不同来判断溢出。


8. Binary Shifts | 二进制移位

Shifting the bits of a binary number left or right effectively multiplies or divides the number by powers of two. This is an efficient operation used in many algorithms.

Left shift by n places: result = original × 2ⁿ
Right shift by n places: result = original ÷ 2ⁿ (integer division, discard remainder)

将二进制数的位向左或向右移动,实际上是对该数进行乘以或除以 2 的幂的运算。这在许多算法中是一种高效的操作。

A left shift of 2 on the binary number 00001001 (9 in decimal) yields 00100100 (36), which is 9 × 2² = 9 × 4. A right shift of 1 on 00010110 (22) gives 00001011 (11), equivalent to 22 ÷ 2. Shifts that cause bits to fall off the end can lead to loss of precision or overflow, depending on the direction and register size.

对二进制数 00001001(十进制 9)左移 2 位得到 00100100(36),即 9 × 2² = 9 × 4。对 00010110(22)右移 1 位得到 00001011(11),相当于 22 ÷ 2。如果移位导致位从末端移出,则可能引起精度损失或溢出,具体取决于移位方向和寄存器大小。


9. Hexadecimal Conversions | 十六进制转换

Hexadecimal (base‑16) provides a compact way to represent binary numbers. Each hex digit corresponds to exactly 4 bits (a nibble). Conversions between binary, denary, and hexadecimal are essential skills.

Binary to hex: group bits from right in 4‑bit nibbles, then convert each nibble to its hex equivalent (0–9, A–F).
Hex to binary: replace each hex digit with its 4‑bit binary code.
Hex to denary: multiply each hex digit by 16 to the power of its position, starting from 16⁰ at the rightmost digit.

十六进制(基数为 16)提供了一种紧凑的二进制数表示法。每个十六进制数字恰好对应 4 位(半个字节)。二进制、十进制与十六进制之间的转换是必备技能。

For example, the binary number 11011010 is grouped as 1101 1010, which gives D in hex for

Published by TutorHao | GCSE 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