📚 IGCSE AQA Computer Science: Formula Summary Handbook | IGCSE AQA 计算机科学:公式汇总手册
This handbook collects every formula, conversion, and essential calculation you need for the IGCSE AQA Computer Science specification. Use it to reinforce your understanding of file sizes, data transfer, binary operations, and error detection — all presented as clear, ready‑to‑apply relationships.
本手册汇总了IGCSE AQA计算机科学考试所需的全部公式、换算和基本计算方法。文件大小、数据传输、二进制运算以及错误检测等内容,都以清晰、便于直接使用的形式呈现,帮助你巩固理解。
1. Storage Unit Conversions | 存储单位换算
All digital data is measured in bits and bytes. A bit is the smallest unit, representing a binary 0 or 1. Eight bits form one byte. Larger units are powers of two: 1 kibibyte (KiB) = 1024 bytes, 1 mebibyte (MiB) = 1024 KiB, and so on. While the terms kilobyte (KB) and megabyte (MB) are often used loosely, exam questions commonly treat 1 KB as 1024 bytes unless specified otherwise.
所有数字数据都以位和字节为单位。位是最小单位,表示二进制的0或1。8个位构成1个字节。更大的单位都是2的幂:1千二元字节(KiB)= 1024字节,1兆二元字节(MiB)= 1024KiB,以此类推。虽然千字节(KB)和兆字节(MB)常被混用,但考试题目通常将1KB视为1024字节,除非另外说明。
2. File Size: Text | 文本文件大小
The size of a plain text file in bits can be estimated by multiplying the number of characters by the bits per character. Standard ASCII uses 7 or 8 bits per character; extended ASCII uses 8 bits. For Unicode, variable‑length encodings may use 8, 16, or 32 bits, but simplified GCSE calculations often assume 16 bits per character.
纯文本文件的大小(以位为单位)可以通过字符数乘以每个字符的位数来估算。标准ASCII每字符用7或8位;扩展ASCII用8位。Unicode采用变长编码,可能用8、16或32位,但简化的GCSE计算常假定每字符16位。
- Text file size (bits) = Number of characters × Bits per character
- 文本文件大小(位)= 字符数 × 每字符位数
Convert to bytes by dividing by 8.
除以8可转换为字节。
3. File Size: Images | 图像文件大小
An uncompressed bitmap image’s file size depends on its resolution (width × height in pixels) and colour depth (bits per pixel). The colour depth determines how many bits are used to store the colour of a single pixel.
未压缩的位图图像文件大小取决于分辨率(宽度×高度,以像素为单位)和色深(每像素位数)。色深决定存储单个像素颜色所用的位数。
Image size (bits) = Width (pixels) × Height (pixels) × Colour depth (bpp)
图像大小(位)= 宽度(像素)× 高度(像素)× 色深(bpp)
To express the result in bytes, divide by 8; for kibibytes, further divide by 1024.
要以字节表示,除以8;要以千二元字节表示,再除以1024。
4. File Size: Sound | 声音文件大小
Sound is digitally recorded by sampling the amplitude at regular intervals. The file size of uncompressed audio depends on the sample rate (Hz), bit depth (bits per sample), number of channels, and duration in seconds.
声音通过定时对振幅进行采样来数字化记录。未压缩音频的文件大小取决于采样率(Hz)、位深度(每样本位数)、声道数和时长(秒)。
Sound size (bits) = Sample rate (Hz) × Bit depth × Channels × Duration (s)
声音大小(位)= 采样率(Hz)× 位深度 × 声道数 × 时长(秒)
Common conversions then apply: bytes = bits ÷ 8, and further divisions by 1024 give KiB, MiB, etc.
然后进行常见换算:字节 = 位 ÷ 8,再除以1024得到KiB、MiB等。
5. Data Transfer Time | 数据传输时间
When you know the file size and the transfer speed (bit rate), the time required to transmit the file can be calculated. Ensure both file size and speed are in the same unit — bits or bytes — before performing the division.
当知道文件大小和传输速度(比特率)时,可以计算传输该文件所需的时间。在进行除法之前,务必确保文件大小和速度使用相同的单位 — 位或字节。
Time (seconds) = File size (bits) ÷ Transfer rate (bps)
时间(秒)= 文件大小(位)÷ 传输速率(bps)
If the transfer rate is given in bytes per second, convert the file size to bytes first.
如果传输速率以字节每秒给出,请先将文件大小转换为字节。
6. Compression Ratio | 压缩比
Compression reduces file size for storage or transmission. The compression ratio compares the original size to the compressed size. The result is typically expressed as a ratio like 4:1 or as a simple decimal number.
压缩可减小文件所占存储空间或传输量。压缩比将原始大小与压缩后大小进行比较。结果通常表示为4:1这样的比例,或一个简单的十进制数。
Compression ratio = Original size ÷ Compressed size
压缩比 = 原始大小 ÷ 压缩后大小
Savings in percentage can also be found: Space saved (%) = ((Original – Compressed) ÷ Original) × 100.
也可以计算节省空间的百分比:节省空间(%)=((原始大小 − 压缩后大小)÷ 原始大小)×100。
7. Binary Shifts | 二进制移位
Binary shifts move all bits in a register to the left or right. A left shift of n places multiplies an unsigned integer by 2ⁿ, provided overflow does not occur. A right shift of n places performs integer division by 2ⁿ, discarding any remainder.
二进制移位将寄存器中的所有位向左或向右移动。左移n位(若无溢出)相当于无符号整数乘以2ⁿ。右移n位相当于整数除以2ⁿ,余数被丢弃。
- Value after left shift = Original value × 2ⁿ
- 左移后的值 = 原值 × 2ⁿ
- Value after right shift = Original value DIV 2ⁿ
- 右移后的值 = 原值 DIV 2ⁿ
These relationships are especially useful for quick multiplication and division in low‑level programming.
这些关系在低级编程中对于快速乘法和除法非常有用。
8. Hexadecimal and Denary Conversions | 十六进制与十进制转换
Although not a single formula, the method for converting hexadecimal to denary relies on place values: each hex digit is multiplied by 16ⁿ, where n increases from 0 at the rightmost digit.
虽然不是单一的公式,但将十六进制转换为十进制的方法依赖于位值:每个十六进制数字乘以16ⁿ,其中n从最右侧数字的0开始递增。
Denary value = Σ (Hex digit × 16⁰, 16¹, 16², …)
十进制值 = Σ(十六进制数字 × 16⁰, 16¹, 16², …)
To convert denary to hex, repeatedly divide by 16 and read the remainders in reverse order.
将十进制转换为十六进制时,反复除以16,然后逆序读取余数。
9. Check Digit Calculations | 校验位计算
Check digits are used to detect errors in numbers like ISBNs and barcodes. The most common method for the IGCSE syllabus is the modulo‑11 system or a simplified weighted sum modulo‑10. Each digit is multiplied by a weight, the results are summed, and the remainder modulo n determines the check digit.
校验位用于检测ISBN和条形码等编号中的错误。IGCSE课程中最常见的方法是模11系统,或简化的加权和模10系统。每个数字乘以一个权值,结果相加,除以n的余数决定校验位。
Check digit = (Weighted sum) MOD n, with adjustments if remainder equals 10
校验位 =(加权和)MOD n,若余数为10则进行调整
For example, ISBN‑10 uses weights 10 down to 1. If the remainder is 10, the check digit is represented as ‘X’.
例如,ISBN‑10使用从10递减到1的权值。如果余数为10,校验位就用“X”表示。
10. Sampling Rate and Bit Rate Relationship | 采样率与比特率关系
The bit rate of an audio stream is the product of the sample rate, bit depth, and number of channels. This is essentially the same relationship used for file size, but it expresses the data transferred per second during playback or recording.
音频流的比特率是采样率、位深度和声道数的乘积。这本质上与计算文件大小所用的关系相同,只是它表示播放或录制期间每秒传输的数据量。
Bit rate (bps) = Sample rate (Hz) × Bit depth × Number of channels
比特率(bps)= 采样率(Hz)× 位深度 × 声道数
This formula is vital for understanding streaming quality and bandwidth requirements.
该公式对于理解流媒体质量和带宽需求至关重要。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导