Data Representation Key Points | IGCSE WJEC 计算机:数据表示 考点精讲

📚 Data Representation Key Points | IGCSE WJEC 计算机:数据表示 考点精讲

Data representation is a cornerstone of IGCSE WJEC Computer Science. Understanding how computers store and manipulate numbers, text, images, and sound is essential for both the exam and real-world computing. This guide breaks down every key concept you need to master.

数据表示是 IGCSE WJEC 计算机科学的基础。理解计算机如何存储和处理数字、文本、图像和声音,对考试和现实中的计算都至关重要。本指南将分解你需要掌握的每一个关键概念。

1. Number Systems: Binary, Denary, and Hexadecimal | 数制系统:二进制、十进制与十六进制

All data inside a computer is stored as binary digits (bits). A single bit can be 0 or 1, representing low or high voltage states. Denary (base‑10) is the system we use every day with digits 0–9. Hexadecimal (base‑16) uses digits 0–9 and letters A–F, where A=10, B=11, …, F=15.

计算机内部所有数据都以二进制数字(位)存储。一个位可以是 0 或 1,代表低电平或高电平状态。十进制(基数为10)是我们日常使用 0–9 的系统。十六进制(基数为16)使用数字 0–9 和字母 A–F,其中 A=10,B=11,……,F=15。

WJEC exams expect you to work confidently with these three bases. Binary numbers are often grouped in nibbles (4 bits) or bytes (8 bits). Hexadecimal is used as a shorter, more human‑friendly way to represent binary because one hex digit corresponds exactly to one nibble (4 bits).

WJEC 考试要求你熟练运用这三种进制。二进制数通常以半字节(4位)或字节(8位)分组。十六进制用于更短、更易读地表示二进制,因为一位十六进制恰好对应一个半字节(4位)。


2. Converting Between Denary and Binary | 十进制与二进制之间的转换

To convert a denary number to binary, draw a place value table with powers of 2 (e.g., 128, 64, 32, 16, 8, 4, 2, 1 for 8‑bit). Starting from the left, ask: does the denary number contain this value? If yes, place a 1 and subtract that value; if no, place a 0. Continue to the right.

将十进制转换为二进制时,绘制一个位值表,写 2 的幂(如 128、64、32、16、8、4、2、1,用于8位)。从左至右,判断十进制数是否包含该值。如果包含,标记 1 并减去该值;如果不包含,标记 0。依次向右进行。

Example: Convert 201 to 8‑bit binary. 128 fits → 1, remainder 73. 64 fits → 1, remainder 9. 32 no → 0. 16 no → 0. 8 fits → 1, remainder 1. 4 no → 0. 2 no → 0. 1 fits → 1. Result: 11001001.

例如:将 201 转换为 8 位二进制。128 可以 → 1,剩余 73。64 可以 → 1,剩余 9。32 不可以 → 0。16 不可以 → 0。8 可以 → 1,剩余 1。4 不可以 → 0。2 不可以 → 0。1 可以 → 1。结果:11001001。

To convert binary to denary, add the place values wherever a 1 appears. For 11001001: 128 + 64 + 8 + 1 = 201.

二进制转十进制时,将所有出现 1 的位值相加。对于 11001001:128 + 64 + 8 + 1 = 201。


3. Converting Between Binary and Hexadecimal | 二进制与十六进制之间的转换

Because each hexadecimal digit corresponds to 4 bits, split the binary number into nibbles from the right. Then convert each nibble separately to its hex equivalent using 0‑9 and A‑F.

因为每个十六进制数字对应 4 位,从右侧将二进制数分成多个半字节。然后将每个半字节单独转换为其对应的十六进制值,使用 0–9 和 A–F。

Binary to hex example: 1011 1101. Left nibble 1011 = 11 = B. Right nibble 1101 = 13 = D. So 10111101 in binary is BD in hex. Often you write it as 0xBD or simply BD.

二进制转十六进制示例:1011 1101。左半字节 1011 = 11 = B。右半字节 1101 = 13 = D。因此二进制 10111101 对应的十六进制是 BD。通常写为 0xBD 或直接 BD。

To convert hex to binary, replace each hex digit with its 4‑bit binary equivalent. For 3F: 3 = 0011, F = 1111 → 00111111. Leading zeros may be kept to show the full byte.

十六进制转二进制时,将每个十六进制数字替换为对应的 4 位二进制。对于 3F:3 = 0011,F = 1111 → 00111111。可以保留前导零以表示完整字节。


4. Denary to Hexadecimal and Vice Versa | 十进制与十六进制直接转换

Although you can convert denary → binary → hex, direct conversion is faster. Divide the denary number by 16 repeatedly, recording remainders. The remainders (in reverse order) become the hex digits (10–15 become A–F).

虽然你可以通过十进制→二进制→十六进制来转换,但直接转换更快。反复将十进制数除以 16,记录余数。余数按逆序排列即为十六进制数字(10–15 写作 A–F)。

Example: 254 ÷ 16 = 15 remainder 14. 15 ÷ 16 = 0 remainder 15. Remainders: 14 (E) and 15 (F). Read backwards: F and E → FE. So 254 in denary is FE in hexadecimal.

示例:254 ÷ 16 = 15 余 14。15 ÷ 16 = 0 余 15。余数:14 (E) 和 15 (F)。逆序读取:F 和 E → FE。因此十进制 254 对应十六进制 FE。

To convert hex to denary, multiply each digit by 16 to the power of its position (rightmost digit is 16⁰ = 1). For FE: F (15) × 16 + E (14) × 1 = 240 + 14 = 254.

十六进制转十进制时,将每位数字乘以 16 的位值次幂(最右边为 16⁰ = 1)。对于 FE:F (15) × 16 + E (14) × 1 = 240 + 14 = 254。


5. Binary Arithmetic: Addition and Overflow | 二进制算术:加法与溢出

Binary addition follows the same rules as denary addition but in base‑2. Key rules: 0+0=0, 0+1=1, 1+1=0 carry 1, 1+1+carry=1 carry 1. Align numbers and add from right to left, carrying into the next column when the sum is 2 or more.

二进制加法遵循与十进制加法相同的规则,但以 2 为基。关键规则:0+0=0,0+1=1,1+1=0 进 1,1+1+进位=1 进 1。对齐数字,从右向左相加,当和大于等于 2 时向下一列进位。

When adding two 8‑bit numbers, the result may be a 9‑bit number. If the computer only stores 8 bits, the extra leftmost bit is lost. This is called overflow. Overflow leads to incorrect results and can cause software errors.

当两个 8 位数相加时,结果可能是一个 9 位数。如果计算机只存储 8 位,多余的左侧最高位会丢失。这称为溢出。溢出会导致结果错误,并可能引起软件错误。

WJEC may ask you to add binary numbers and identify when overflow occurs. Always check if the carry into the final column (beyond 8 bits) exists.

WJEC 可能会要求你进行二进制加法并判断何时发生溢出。务必检查是否出现了超出第 8 位的最终进位。


6. Binary Shifts: Multiplication and Division | 二进制移位:乘法与除法

Shifting a binary number to the left by one place multiplies it by 2. Shifting right by one place divides by 2, ignoring any remainder (integer division). This is a very fast operation inside the CPU.

二进制数向左移动一位相当于乘以 2。向右移动一位相当于除以 2,忽略余数(整除)。这在 CPU 内部是一种非常快速的操作。

Left shift example: 00001110 (14) shifted left once becomes 00011100 (28). A left shift of two places multiplies by 4 (2²). Right shift: 00001110 (14) shifted right once becomes 00000111 (7).

左移示例:00001110 (14) 左移一位变为 00011100 (28)。左移两位乘以 4 (2²)。右移:00001110 (14) 右移一位变为 00000111 (7)。

Be careful: shifting left can cause overflow if a 1 is moved into the position beyond the most significant bit. WJEC questions often combine shifts with binary arithmetic to test your understanding of both.

注意:如果 1 移到了超出最高有效位的位,左移可能导致溢出。WJEC 考题经常将移位与二进制算术结合起来,考察你对两者的理解。


7. Representing Text: ASCII and Unicode | 文本表示:ASCII 与 Unicode

Text is represented by assigning a unique binary code to each character. ASCII (American Standard Code for Information Interchange) originally used 7 bits, allowing 128 characters (0–127). Extended ASCII uses 8 bits for 256 characters.

文本表示通过为每个字符分配唯一的二进制编码来实现。ASCII(美国信息交换标准码)最初使用 7 位,可表示 128 个字符 (0–127)。扩展 ASCII 使用 8 位,可表示 256 个字符。

Unicode was developed to support international characters, symbols, and emojis. It uses up to 32 bits per character, allowing over a million code points. UTF‑8 is a popular encoding that uses variable‑length bytes, maintaining backward compatibility with ASCII.

Unicode 是为了支持国际字符、符号和表情而开发的。它最多使用 32 位每个字符,可容纳超过一百万个码位。UTF‑8 是一种流行的编码方式,使用可变长度的字节,同时保持与 ASCII 的后向兼容。

Exam tip: know that ASCII is sufficient for the English alphabet but Unicode is necessary for multilingual documents. Be able to compare their storage requirements.

考试提示:要知道 ASCII 足以处理英文字母,但 Unicode 对于多语言文档是必需的。能够比较两者的存储需求。


8. Representing Images: Pixels and Colour Depth | 图像表示:像素与颜色深度

A bitmap image is made of a grid of tiny squares called pixels. Each pixel is assigned a binary value representing its colour. The number of bits used per pixel is the colour depth (bit depth).

位图图像由称为像素的小方格网格构成。每个像素被赋予一个表示其颜色的二进制值。每个像素使用的位数就是颜色深度(位深)。

With a colour depth of n bits, the number of possible colours is 2ⁿ. A 1‑bit image can only show black and white. An 8‑bit image can show 256 colours. A 24‑bit image (8 bits each for red, green, blue) can show over 16 million colours.

若颜色深度为 n 位,可显示的颜色数为 2ⁿ。1 位图像只能显示黑白。8 位图像可显示 256 种颜色。24 位图像(红、绿、蓝各 8 位)可显示超过一千六百万种颜色。

Image resolution is the number of pixels in the width and height (e.g., 1920 × 1080). Higher resolution and higher colour depth give better quality but larger file sizes.

图像分辨率是指宽度和高度上的像素数量(例如 1920×1080)。更高的分辨率和更高的颜色深度可提供更好的画质,但文件大小也更大。


9. Representing Sound: Sampling and Bit Depth | 声音表示:采样与位深

Sound is analogue; to store it digitally, the sound wave is measured at regular intervals. This process is called sampling. Each measurement is a sample. The sampling rate is measured in Hertz (Hz); CD quality uses 44,100 samples per second (44.1 kHz).

声音是模拟信号;为了以数字方式存储,需要对声波进行定期测量。这个过程叫做采样。每次测量是一个样本。采样率以赫兹 (Hz) 为单位;CD 质量使用每秒 44,100 个样本 (44.1 kHz)。

The number of bits used to store each sample is the bit depth (or sample resolution). A higher bit depth allows a more accurate representation of the sound’s amplitude. CD quality uses 16 bits per sample.

用于存储每个样本的位数称为位深(或采样分辨率)。更高的位深可以更准确地表示声音的振幅。CD 质量每个样本使用 16 位。

Increasing sampling rate and bit depth improves sound quality but increases file size. The file size of uncompressed audio can be calculated as: sampling rate × bit depth × number of channels × duration in seconds.

提高采样率和位深可改善音质,但会增加文件大小。未压缩音频的文件大小可计算为:采样率 × 位深 × 声道数 × 时长(秒)。


10. File Size Calculations | 文件大小计算

WJEC often asks you to calculate file sizes for images and sound. The basic formulas are:

WJEC 经常要求你计算图像和声音的文件大小。基本公式如下:

  • Image file size: width (pixels) × height (pixels) × colour depth (bits). Then divide by 8 to convert bits to bytes. Often express in kilobytes (KB) by dividing by 1024, or megabytes (MB) by dividing by 1024².
  • 图像文件大小:宽度(像素)× 高度(像素)× 颜色深度(位)。然后除以 8 转换为字节。通常再除以 1024 表示为千字节 (KB),或除以 1024² 表示为兆字节 (MB)。
  • Sound file size: sampling rate (Hz) × bit depth (bits) × number of channels × duration (s). Convert bits to bytes and then to higher units as needed.
  • 声音文件大小:采样率 (Hz) × 位深 (位) × 声道数 × 时长 (s)。根据需要将位转换为字节,再转换为更高单位。

Example calculation: A 5‑second stereo audio clip at 44.1 kHz, 16‑bit depth: 44100 × 16 × 2 × 5 = 7,056,000 bits. Divide by 8: 882,000 bytes. Divide by 1024: approximately 861 KB. Always show your working in the exam.

计算示例:一段 5 秒的立体声音频,44.1 kHz、16 位深:44100 × 16 × 2 × 5 = 7,056,000 位。除以 8:882,000 字节。除以 1024:约 861 KB。考试中务必展示计算过程。

Be careful with units: 1 byte = 8 bits; 1 KB = 1024 bytes; 1 MB = 1024 KB; 1 GB = 1024 MB. Some contexts may use 1000 as the divisor, but WJEC typically uses 1024 for data storage questions.

注意单位:1 字节 = 8 位;1 KB = 1024 字节;1 MB = 1024 KB;1 GB = 1024 MB。某些场景可能使用 1000 作为除数,但 WJEC 在数据存储问题中通常使用 1024。


11. Data Compression: Lossy vs Lossless | 数据压缩:有损与无损

Compression reduces file size to save storage space and speed up transmission. Lossless compression (e.g., PNG, ZIP, FLAC) reduces file size without losing any data. The original file can be perfectly reconstructed. It works by finding patterns and redundancy in the data.

压缩可以减小文件大小,节省存储空间并加快传输速度。无损压缩(如 PNG、ZIP、FLAC)在不丢失任何数据的情况下减小文件大小。原始文件可以被完美重建。它通过寻找数据中的模式和冗余来实现。

Lossy compression (e.g., JPEG, MP3, MPEG) reduces file size by permanently removing some data considered less important. The human eye or ear may not notice the difference. Lossy achieves much higher compression ratios but the quality degrades with repeated editing and re‑saving.

有损压缩(如 JPEG、MP3、MPEG)通过永久删除一些被认为不太重要的数据来减小文件大小。人眼或人耳可能注意不到差异。有损压缩可以实现更高的压缩比,但在反复编辑和重新保存时质量会下降。

Exam questions often ask you to choose the appropriate compression for a scenario. For text files and programs, use lossless. For photographs, video, and music streaming, lossy is acceptable.

考试中常常要求你为特定场景选择合适的压缩方式。对于文本文件和程序,应使用无损。对于照片、视频和流媒体音乐,有损是可以接受的。


12. Exam Tips and Common Pitfalls | 考试技巧与常见误区

Always read the question carefully to check the required bit length. Converting 8‑bit binary to hex requires splitting into two nibbles; many students forget to pad with leading zeros when needed (e.g., 0110 should be used for a full nibble).

仔细读题,确认要求的位数。将 8 位二进制转换为十六进制时,需要分成两个半字节;许多学生忘记在必要时用前导零补齐(例如,应使用 0110 表示一个完整的半字节)。

In binary addition, don’t forget to handle the carry correctly. A common mistake is adding 1+1 as 0 with carry, but then forgetting to add the carry to the next column. Also, clearly state when overflow occurs.

在二进制加法中,不要忘记正确处理进位。一个常见错误是将 1+1 算作 0 并进位,但随后忘记将进位加到下一列。此外,在发生溢出时要明确说明。

When calculating file sizes, include the steps: bit calculation, bytes conversion, then KB or MB conversion. Use the exact powers (1024) unless instructed otherwise. Present your answer with the correct unit (B, KB, MB, GB).

计算文件大小时,要包含步骤:位计算,转换为字节,再转换为 KB 或 MB。除非另有指示,使用精确的幂 (1024)。用正确的单位呈现答案 (B、KB、MB、GB)。

For compression, link the answer to the scenario. Mention the trade‑off between quality and file size. Use technical vocabulary like ‘redundancy’, ‘perceptual coding’, ‘resolution’, and ‘sampling rate’ where relevant. Finally, practice past paper questions under timed conditions to build confidence.

对于压缩,要将答案与场景联系起来。提及质量与文件大小之间的权衡。在适当的地方使用技术词汇,如 ‘redundancy’、’perceptual coding’、’resolution’ 和 ‘sampling rate’。最后,在限时条件下练习历年真题以建立信心。

Published by TutorHao | IGCSE WJEC 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