← 返回资讯屏轩教育 · 行业资讯

AQA计算机科学 进制转换 位图 采样 压缩 | AQA Computer Science: Number Base Conversion, Bitmaps, Sampling, Compression

2026-10-18 22:07 · 本文部分内容由AI辅助创作

AQA计算机科学 进制转换 位图 采样 压缩

Paper 2 开考十分钟,很多学生就在第一道数据表示题上停住:题目给出一串八位二进制,要求写出十进制值,再转成十六进制。这类题在 AQA GCSE Computer Science 8525 的 3.3 节里,而 3.3 的全部算分点都落在 Paper 2。8525 是线性资格,所有卷子在课程结束时一次考完,没有计入成绩的课程作业。Paper 1 是 Computational thinking and programming skills,2 小时 90 分,占 50%。Paper 2 是 Computing concepts,1 小时 45 分钟 90 分,同样占 50%,直接考 3.3 到 3.8。数据表示就是 3.3,Paper 1 只是间接用到二进制位模式。两卷合计 180 分,数据表示这一章的分值通常在个位数到十几分之间浮动。

Walk into a Paper 2 hall and the first data representation question usually stops a few students cold: an eight-bit string that has to be converted to denary, then to hexadecimal. Section 3.3 of the AQA 8525 specification carries all of its marks in Paper 2 rather than Paper 1, which surprises anyone revising the chapter alongside programming; Paper 1 is Computational thinking and programming skills (2 hours, 90 marks, 50 per cent), while Paper 2 is Computing concepts (1 hour 45 minutes, 90 marks, 50 per cent) and examines sections 3.3 to 3.8 directly. Together the two papers add up to 180 marks, and the data representation questions typically account for somewhere between a handful and the mid-teens.

三种进制与八位位值

任何进制都靠位值说话,二进制每一位的权重从右往左依次是 1、2、4、8、16、32、64、128。八个位凑成一个字节,左端叫最高位,右端叫最低位。同一个位置在十进制里是 10 的幂,在十六进制里是 16 的幂。写转换题时先把权重写在各位上方,这个动作能省掉后面大半的错。很多学生以为只要背住 8421 就够了,四位的 8421 只覆盖半个字节。整字节的题必须用 128 起的全套权重,写漏一位答案就整体偏移。题目给的二进制串先数位数,八位和四位的处理方法不一样。数错的代价是整题重做,而数位数只要几秒。

Every base is really about place value: reading right to left, the weights in binary run 1, 2, 4, 8, 16, 32, 64 and 128, with the leftmost position of a byte called the most significant bit and the rightmost the least significant. Writing those weights above the columns before starting a conversion removes most of the careless errors examiners see, because the familiar 8421 shortcut only covers four bits and a full byte needs the sequence that begins at 128. Counting the digits in the string first tells you which method applies, since an eight-bit question and a four-bit question are marked on different working.

三种互转与 255 这个上限

AQA 的 3.3.2 把范围限定在 0 到 255,八位无符号数的最大值正好是 255。同一个上限有三种写法:十进制 255、二进制 1111 1111、十六进制 FF。把 200 转成二进制,用权重从大到小试减:128 够用,余 72;64 够用,余 8;8 正好用完,于是得到 11001000。把 156 转成十六进制,先除 16 得 9 余 12,12 记作 C,结果是 9C。反过来把 2F 转成十进制,就是 2 乘 16 加 15,等于 47。二进制转十六进制不必经过十进制,从右往左四位一组直接换,1001 1100 分成 9 和 C。常见的错误是分组时从左边开始切,切错一位整题全错。

The specification limits 3.3.2 to the range 0 to 255, which is exactly what eight unsigned bits can hold, so the ceiling appears three ways: denary 255, binary 1111 1111 and hexadecimal FF. Converting 200 means subtracting place values from the top down, leaving 72 after 128, then 8 after 64, and 8 clears the rest to give 11001000; going the other direction, 156 divides as nine remainder twelve, written 9C, and 2F computes as two sixteens plus fifteen, or 47. Binary to hexadecimal never needs denary as a stepping stone, since grouping four bits from the right turns 1001 1100 into 9 and C, while grouping from the left shifts every digit.

十六进制在计算机科学里为什么常用

十六进制出现频率高,原因是它和二进制之间是整齐的四对一关系。一个十六进制位正好对应四个二进制位,一个字节用两位十六进制就能写完。如果全部用二进制记录,一个字节要八位,抄写和核对都容易漏位。颜色代码是学生最熟悉的例子,#FF8800 这类写法里每两位分别是红绿蓝的亮度,最大值 255 正好对应 FF。内存地址与错误码也常用十六进制,因为短、容易分段。阅卷时见过不少学生把 0x 前缀当成数字的一部分算进去。前缀只是标记进制,不参与任何计算。写答案时省掉前缀不会扣分,写错位数才会。

Hexadecimal earns its place because it lines up with binary in exact groups of four bits, so one hex digit maps to half a byte and a whole byte takes exactly two characters. Colour codes make the point concrete: in a value such as #FF8800 the three pairs give red, green and blue levels, each topping out at FF, which is 255. Memory addresses and error codes use the same shorthand for much the same reason, and the 0x prefix simply flags the base rather than forming part of the number being converted.

数据单位与十进制前缀

3.3.3 的单位用的是十进制前缀,1 kB 等于 1000 字节,1 MB 等于 1000 kB,1 GB 等于 1000 MB,1 TB 等于 1000 GB。小写 b 表示位,大写 B 表示字节,一个字节是八位。这个差别在计算文件大小时决定答案相差八倍。spec 里专门说明,历史上 kilobyte 常被当作 1024 使用,但本资格按十进制处理。kibi 与 mebi 这一套二进制前缀不在考查范围。学生最常把 Mb 和 MB 看成一个东西,题目写成 Mb/s 时说的是每秒多少兆位。换算方向也要盯住,从位到字节除以八,从字节到千字节除以一千。两步都写出来,比在脑子里跳步可靠。

Section 3.3.3 uses decimal prefixes throughout: 1 kB is 1000 bytes, 1 MB is 1000 kB, 1 GB is 1000 MB and 1 TB is 1000 GB, with a lower-case b meaning bit and an upper case B meaning byte, eight bits to the byte. The specification notes that kilobyte was historically treated as 1024, then states that this qualification uses the decimal value, so binary prefixes such as kibi and mebi sit outside the scope; a figure written in Mb/s therefore describes megabits per second rather than megabytes. Getting the direction wrong throws an answer out by a factor of eight, which is why the conversion deserves a line of working rather than a mental jump.

二进制加法、进位与溢出

3.3.4 的加法题最多三个二进制数,每个最多八位,每一列最多三个 1,答案最多八位。规则只有四条:0 加 0 得 0,0 加 1 得 1,1 加 1 得 0 进 1,三个 1 相加得 1 进 1。拿 00110101 加 00010011 练手,从最低位往左逐列算,结果是 01001000,验算就是 53 加 19 等于 72。八位答案装不下的情况叫溢出,第八位之后的进位按 spec 不考。这一步最容易出错的地方是漏写进位,尤其连着三列都有进位时。做完把结果按权重反读一遍,能立刻发现进错位造成的整数倍偏差。题目若给三个数,先把三个数竖着对齐再算,不要两两相加后再补。

Addition in 3.3.4 tops out at three binary numbers of no more than eight bits each, with never more than three ones in a single column and an answer that still fits in eight bits. The rules reduce to four cases: nothing plus nothing, one plus one giving zero and a carry, and three ones giving one and a carry; working 00110101 plus 00010011 column by column from the right produces 01001000, which checks against 53 plus 19 making 72. Carries are what examiners see dropped most often, and reading the result back through the place values catches a carry that landed one column out.

逻辑移位:左移乘 2,右移除 2

逻辑移位只动位的位置,不改变位的个数,左移一位等于乘 2,右移一位等于除 2。00001010 左移一位变成 00010100,也就是从 10 变成 20。48 右移两位,110000 变成 001100,结果是 12。移位与乘除的对应关系背后是位值,左移把每一位的权重翻倍,最右端补 0。右移时最左端补 0,被挤出去的最低位直接丢掉,所以奇数右移会出现取整。spec 只考逻辑移位,不考小数表示。很多学生以为移位后要补 1 才能保持符号,那是算术移位的做法,这个题型不涉及。移位前把原数写成二进制,比在十进制里口算更稳。

A logical shift moves the bits along without changing how many there are, so one place to the left doubles the value and one place to the right halves it: 00001010 becomes 00010100, turning 10 into 20, and shifting 48 right twice turns 110000 into 001100, which is 12. The arithmetic works because a left shift doubles every place value while a zero enters at the right-hand end; shifting right pushes zeros in at the left and discards the bit that falls off, so odd numbers lose their remainder. Only logical shifts are assessed, so sign extension belongs to arithmetic shifts that this section does not cover.

字符编码:7 位 ASCII 与 Unicode

3.3.5 只考两件事,7 位 ASCII 与 Unicode。7 位 ASCII 一共 128 个码位,覆盖大写字母、小写字母、数字与标点。码值在每个分组内连续排列,A 是 65,B 是 66,a 是 97,0 是 48。记住 A 与 a 相差 32,就能推出大小写两整组。Unicode 存在的理由是 ASCII 装不下中文、阿拉伯文与各类符号,它用更多位给字符编号。同一封邮件里出现多种文字,靠的就是 Unicode。常见的错误是以为 ASCII 用 8 位,标准里第八位是校验位或留空。题目要你写某个字符的码值,先判它在哪一组,再加组内偏移,两步骤分明。

Section 3.3.5 covers just two things: seven-bit ASCII and Unicode. Seven-bit ASCII holds 128 code points and covers upper case, lower case, digits and punctuation, with values running continuously inside each group so that A is 65, a is 97 and 0 is 48; the gap of 32 between A and a unlocks every letter pair. Unicode exists because ASCII cannot hold Chinese, Arabic or the full set of symbols, and a single message mixing several scripts depends on that wider numbering rather than on a seven-bit table.

位图:像素、图像尺寸与色彩深度

位图把画面拆成一格一格的像素,每个像素的颜色由一个位模式决定。色彩深度是每个像素使用的位数,1 位只有黑白两色,8 位是 256 色,16 位是 65536 色,24 位超过一千六百万色。图像尺寸用宽乘高表示,单位是像素。3.3.6 要求两个方向都能做:给出二进制模式画出像素图,给出像素图写出二进制。题目常给一个 4 乘 4 的网格和一段二进制串,按行从左到右填格。颜色越多文件越大,因为每个像素要更多位。这一步最容易把行列读反,先把宽和高写在网格外面再动手。填错一格,后面的位全部错位。

A bitmap breaks an image into a grid of pixels, and each pixel takes its colour from a pattern of bits. Colour depth counts the bits per pixel, so one bit gives black and white, eight bits give 256 colours, sixteen give 65,536 and twenty-four pass sixteen million; image size is quoted as width by height in pixels. Section 3.3.6 asks for the process in both directions, drawing a grid from a binary string and writing the string back from a picture, and reading width and height the wrong way round is the mistake that shows up most often in scripts.

图像文件大小的计算

位图文件大小的公式是 Size 等于宽乘高乘色彩深度,算出来的单位是位。换成字节要除以 8。一张 200 乘 400 的 16 位图,先算 80000 个像素,再乘 16 得 1280000 位,除以 8 是 160000 字节,按十进制前缀就是 160 kB。同一尺寸改成 24 位,结果是 1920000 位、240000 字节、240 kB。多出的 80 kB 全部来自每个像素多出来的 8 位。题目若只给宽高与颜色总数,先用 2 的幂反推色彩深度,256 色对应 8 位。常见的错误是算完位就写 kB,忘了除以 8。写完答案顺手检查单位,能救回不少分。

File size follows a single line: width multiplied by height multiplied by colour depth gives bits, and dividing by eight gives bytes. A 200 by 400 image at sixteen bits holds 80,000 pixels, which is 1,280,000 bits, or 160,000 bytes, or 160 kB on the decimal prefixes AQA uses; raising the depth to twenty-four bits gives 1,920,000 bits and 240 kB, so the extra 80 kB comes entirely from eight more bits per pixel. When a question gives only the number of colours, the depth follows from the power of two, since 256 colours means eight bits.

声音:采样率、样本分辨率与文件大小

声音是模拟信号,数字化要做两件事:按固定间隔取样,再把每个样本的幅度记成一个数字。取样频率的单位是赫兹,1 赫兹表示每秒取一个样本,44100 赫兹即每秒四万四千一百个样本。样本分辨率是每个样本用多少位,位数越多越接近原始波形。文件大小公式是取样频率乘样本分辨率乘秒数,单位是位。44100 赫兹、16 位、30 秒的音频,先得 21168000 位,除以 8 是 2646000 字节,约 2.65 MB。改成 8000 赫兹、8 位、60 秒,只有 3840000 位,也就是 480 kB。取样太稀会把高频细节抹平,这是电话音质发闷的原因。三段计算都写清单位,扣分点基本就没了。

Digitising sound takes two steps: sample the wave at fixed intervals, then record each sample as a number. Sampling rate is measured in hertz, so 44,100 Hz means 44,100 samples a second, while sample resolution is the number of bits per sample; file size is rate times resolution times seconds, in bits. Thirty seconds at 44,100 Hz and sixteen bits gives 21,168,000 bits, or 2,646,000 bytes, roughly 2.65 MB, and dropping to 8,000 Hz at eight bits for a minute gives 480 kB, which is why telephone audio sounds thin.

压缩:RLE 与 Huffman,以及 2027 年的口径

3.3.8 要能解释为什么压缩,也要能读 RLE 与 Huffman 两种方法。RLE 把连续重复的字符换成频次加字符,AAAAAABBB 记作 6A3B,九个字符变成四个。它只在重复多的数据上有效,一张每个像素都不同的照片几乎压不动。Huffman 按出现频率建树,频率高的字符拿短码,频率低的拿长码。200 个字符用 7 位 ASCII 是 1400 位,平均 4 位的 Huffman 只要 800 位,省下 600 位即 75 字节。考纲变化要说清年份:DfE 在 2025 年 3 月 31 日宣布更新 GCSE Computer Science 科目内容,AQA 相应精简 8525,2025 年 9 月起施教、2027 年夏季首次考试。数据表示这一章唯一的改动是 3.3.7 删掉措辞,3.3 的计算要求没有变化。现行 spec 版本为 Version 1.3,日期 2025 年 6 月 16 日。

Section 3.3.8 asks why compression is used and how run-length encoding and Huffman coding work. RLE replaces a run of repeated characters with a count and the character, so AAAAAABBB becomes 6A3B and nine characters shrink to four, which does little for a photograph where every pixel differs; Huffman coding builds a tree from frequency so common characters get short codes, and 200 characters at seven-bit ASCII cost 1,400 bits against 800 bits at an average of four, saving 600 bits or 75 bytes. The specification change is narrow: the DfE announced updated subject content on 31 March 2025, AQA trimmed 8525 accordingly with teaching from September 2025 and first examination in summer 2027, and the only edit inside 3.3 removes a phrase from 3.3.7 while every calculation requirement stays.

戴睿(dere)Neo优选系列 创意双触摸屏高性能笔记本电脑大学生AI学习商务办公设计炒股娱乐手提轻薄本32/1TB¥4586.0📱 去京东购买京东精选

广告 / Sponsored
商品图片
英文原版剑桥国际中学计算机教材 Cambridge Lower Secondary Computing Learner…
¥313
到手价 · 以淘宝页面为准
计算机 备考教辅 · 正版现货 · 与本文同科同级别
查看详情 / View on Taobao
广告 / Sponsored
商品图片
剑桥国际 Cambridge International AS & A Level Computer Science …
¥228
到手价 · 以淘宝页面为准
计算机 备考教辅 · 正版现货 · 与本文同科同级别
查看详情 / View on Taobao
更多咨询请联系16621398022(同微信)

需要一对一辅导?Need One-on-One Tutoring?

A-Level / GCSE / IB / KS2-KS3 全科辅导,按考试局大纲逐题拆解

16621398022 同微信

Visit aleveler.com
备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao