📚 GCSE CCEA Computer Science: Binary – Key Points | GCSE CCEA 计算机:二进制考点精讲
Binary forms the bedrock of all modern computing. Understanding how numbers, text, images and logic are represented in base‑2 is essential for the CCEA GCSE Computer Science examination. This article covers the key concepts, conversion methods, binary arithmetic, hexadecimal shorthand and common pitfalls.
二进制是现代计算技术的基石。掌握数字、文本、图像和逻辑如何以基数为2的形式表示,是 CCEA GCSE 计算机科学考试的必修内容。本文梳理了核心概念、转换方法、二进制运算、十六进制简写以及典型易错点。
1. What is Binary? | 什么是二进制?
Binary is a base‑2 number system that uses only two symbols: 0 and 1. In the physical world of a computer, these correspond to two distinct voltage levels or the on/off state of a transistor, which makes binary incredibly reliable for storage and processing.
二进制是基数为2的数制,只使用0和1两个符号。在计算机的物理世界中,它们对应两种不同的电压水平或晶体管的开/关状态,这使得二进制在存储和处理上极为可靠。
Every piece of data inside a computer — whether it is a program instruction, a colour in a photograph, or a character on screen — is ultimately encoded as a pattern of bits. This universality is why binary is called the language of computers.
计算机内的每一份数据——无论是程序指令、照片中的颜色还是屏幕上的字符——最终都编码为比特模式。这种通用性正是二进制被称为计算机语言的原因。
A single binary digit is called a bit, and a group of 8 bits forms a byte, which is the standard building block for storing one character or a small integer value.
一个二进制数字称为一个位(bit),8 个位组成一个字节(byte),字节是存储一个字符或一个小整数值的标准构件。
2. Bits, Bytes and Storage Units | 位、字节与存储单位
A bit (binary digit) is the smallest unit of data in computing, holding either a 0 or a 1. A collection of 4 bits is called a nibble (half a byte), and 8 bits make a byte. Historically, a byte was the amount needed to encode a single character of text.
位(二进制数字)是计算中最小的数据单位,保存 0 或 1。4 个位合称为半字节(nibble),8 个位组成一个字节。历史上,一个字节正是编码一个文本字符所需的量级。
Larger units are based on powers of 2, not 10. In the CCEA syllabus you need to be familiar with: kilobyte (KB) = 1024 bytes, megabyte (MB) = 1024 KB, gigabyte (GB) = 1024 MB, and terabyte (TB) = 1024 GB. These are often referred to as kibibyte (KiB), mebibyte (MiB) etc. in precise contexts, but the exam will use the traditional KB, MB notation while expecting you to know the 2¹⁰ factors.
更大的单位基于 2 的幂而非 10。CCEA 大纲要求熟悉:千字节 (KB) = 1024 字节,兆字节 (MB) = 1024 KB,吉字节 (GB) = 1024 MB,太字节 (TB) = 1024 GB。在精确语境中它们常被称为 kibibyte (KiB) 等,但考试沿用传统的 KB、MB 写法,同时要求你理解其 2¹⁰ 的换算因子。
Be careful not to confuse storage units with transmission speeds: file sizes are measured in bytes, whereas network speeds are given in bits per second (bps). Always note the capital ‘B’ for byte and lowercase ‘b’ for bit.
注意不要混淆存储单位和传输速度:文件大小以字节为单位,而网络速度以比特每秒(bps)为单位。牢记大写 ‘B’ 表示字节,小写 ‘b’ 表示位。
3. Binary to Decimal Conversion | 二进制转十进制
To convert a binary number to decimal, write the column headings as powers of 2 from right to left, starting with 2⁰ on the right. Then add up the column values where a 1 appears. For example, the binary number 1011₂:
要将二进制数转换为十进制,从右向左写出位权(2 的幂),最右为 2⁰。然后累加出现 1 的位权。例如二进制数 1011₂:
1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11₁₀
An exam question might require you to show all steps, so always write the full expansion. For an 8‑bit number, the place values are 128, 64, 32, 16, 8, 4, 2, 1. Practise checking your result by halving and doubling exercises to avoid careless mistakes.
考题可能要求展示完整步骤,所以务必写出展开式。对于 8 位数,位权依次为 128, 64, 32, 16, 8, 4, 2, 1。建议通过半数与倍数练习来校验结果,避免粗心错误。
4. Decimal to Binary Conversion | 十进制转二进制
The standard method taught in CCEA is successive division by 2. Divide the decimal number by 2, record the remainder (0 or 1), and repeat with the quotient until the quotient is 0. The binary number is the remainders read upwards (from last to first).
CCEA 教授的标准方法是连续除以 2:将十进制数除以 2,记录余数(0 或 1),再用商重复该过程直到商为 0。从下往上读取余数即得二进制数。
For example, to convert 25₁₀ to binary: 25 ÷ 2 = 12 remainder 1; 12 ÷ 2 = 6 remainder 0; 6 ÷ 2 = 3 remainder 0; 3 ÷ 2 = 1 remainder 1; 1 ÷ 2 = 0 remainder 1. Reading upwards gives 11001₂. You can then pad with leading zeros to a fixed width if required, e.g. 00011001 for an 8‑bit representation.
例如,将 25₁₀ 转二进制:25 ÷ 2 = 12 余 1;12 ÷ 2 = 6 余 0;6 ÷ 2 = 3 余 0;3 ÷ 2 = 1 余 1;1 ÷ 2 = 0 余 1。从下往上读得 11001₂。需要时可在左侧补零达到固定位宽,如 8 位表示为 00011001。
To check your work, convert the binary back to decimal using the method from Section 3. This two‑way skill is almost always tested in the examination.
检查工作的方法是,用第 3 节的方法将二进制转回十进制。双向转换能力在考试中几乎必考。
5. Binary Addition | 二进制加法
Binary addition follows four simple rules: 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, and 1 + 1 = 0 carry 1 to the next column. If a column produces a carry of 1 and the next column already has two 1s (1+1), the sum becomes 1 with a carry of 1 again, continuing leftwards.
二进制加法遵循四条简单规则:0+0=0,0+1=1,1+0=1,1+1=0 并向高位进 1。若某列产生进位 1,而下一列原本就有两个 1(1+1),该位和为 1 且继续向左进位。
Example: add 0101₂ (5) and 0011₂ (3). Rightmost: 1+1 = 0 carry 1; next: 0+1 plus carry 1 = 0 carry 1; next: 1+0 plus carry 1 = 0 carry 1; leftmost: 0+0 plus carry 1 = 1. Result: 1000₂ (8). Always align the numbers to the right and add extra leading zeros to match the bit width.
示例:将 0101₂(5)与 0011₂(3)相加。最右:1+1=0 进位 1;次位:0+1 加进位 1 = 0 进位 1;再左:1+0 加进位 1 = 0 进位 1;最左:0+0 加进位 1 = 1。结果:1000₂ (8)。务必右对齐并在左侧补零使位宽一致。
6. Overflow Errors | 溢出错误
Overflow occurs when the result of a binary addition requires more bits than the storage location can hold. For example, adding two 8‑bit numbers might yield a 9‑bit result, but if the CPU register or memory can only store 8 bits, the most significant bit (the leftmost ‘carry out’) is lost, producing an incorrect answer.
溢出发生于二进制加法的结果所需的位数超出存储位置所能容纳的位数。例如,两个 8 位数相加可能得到 9 位结果,但若 CPU 寄存器或内存只能存储 8 位,最高有效位(最左“进位输出”)会丢失,导致错误答案。
CCEA questions often ask you to identify whether an overflow has occurred in a given addition. You can detect overflow by examining the carry into the most significant bit (MSB) and the carry out of the MSB: if they are different, overflow has occurred for signed numbers, but at GCSE level you mainly need to check whether a ‘ninth’ bit has been generated when working with 8‑bit registers.
CCEA 试题常要求判断给定加法是否发生溢出。可检查进入最高有效位(MSB)的进位和 MSB 向外的进位:对有符号数而言两者不同则溢出。不过在 GCSE 层面,主要需核查在使用 8 位寄存器时是否生成了“第九位”。
In binary addition exercises, always compare the bit width of the operands and the result. If the result would need an extra column to the left, an overflow flag would be set in the processor’s status register.
在做二进制加法练习时,始终比较操作数与结果的位宽。若结果需要在左侧增加一列,则处理器的状态寄存器中将设置溢出标志。
7. Introduction to Hexadecimal | 十六进制简介
Hexadecimal (base‑16) is a more human‑friendly way to represent binary values. It uses the digits 0–9 and the letters A–F, where A stands for 10, B for 11, up to F for 15. One hex digit can represent exactly 4 bits (one nibble).
十六进制(基数为16)是一种更人性化的表示二进制数值的方式。它使用数字 0–9 以及字母 A–F,其中 A 代表 10,B 代表 11,一直到 F 代表 15。一个十六进制位恰好可以表示 4 个二进制位(一个半字节)。
Because 16 is a power of 2 (2⁴), translating between binary and hex is straightforward and eliminates long strings of 0s and 1s. For instance, the binary byte 10101100 splits into 1010 (A) and 1100 (C), giving AC₁₆. In computing, hex is used for colour codes, memory addresses and machine code display.
由于 16 是 2 的幂 (2⁴),二进制与十六进制之间的转换非常直接,并消除了冗长的 0 与 1 串。例如,二进制字节 10101100 分为 1010 (A) 和 1100 (C),得到 AC₁₆。计算中,颜色代码、内存地址和机器码显示常常采用十六进制。
8. Converting between Binary and Hexadecimal | 二进制与十六进制互相转换
To convert binary to hex, group the binary digits into nibbles from the right, adding leading zeros if necessary. Then replace each nibble with its hex equivalent. To go from hex to binary, expand each hex digit into its 4‑bit binary form.
将二进制转为十六进制时,从右起将二进制位每 4 位一组(半字节),必要的话在左侧补零。然后将每个半字节替换为对应的十六进制值。十六进制转二进制时,则将每个十六进制位展开为 4 位二进制。
Memorising the 16 hex digits and their binary equivalents is essential:
| Hex | Binary | Hex | Binary |
| 0 | 0000 | 8 | 1000 |
| 1 | 0001 | 9 | 1001 |
| 2 | 0010 | A (10) | 1010 |
| 3 | 0011 | B (11) | 1011 |
| 4 | 0100 | C (12) | 1100 |
| 5 | 0101 | D (13) | 1101 |
| 6 | 0110 | E (14) | 1110 |
| 7 | 0111 | F (15) | 1111 |
This table is a powerful reference: once you know it, converting the binary number 11101001₂ to hex becomes simply E9₁₆. Many exam questions ask for hex representation of binary data to test exactly this skill.
这张表是强有力的参考:一旦记熟,将二进制数 11101001₂ 转为十六进制即得 E9₁₆。许多考题要求给出二进制数据的十六进制表示,正是为了考查这项技能。
9. Binary in Character Representation | 字符的二进制表示
Characters are stored in binary using standardised character sets. ASCII (American Standard Code for Information Interchange) originally used 7 bits, providing 128 codes for English letters, digits and symbols. Extended ASCII uses 8 bits, allowing 256 characters to include accented letters and line‑drawing symbols.
字符通过标准化的字符集以二进制存储。ASCII(美国信息交换标准码)最初使用 7 位,为英文字母、数字和符号提供了 128 个编码。扩展 ASCII 使用 8 位,可容纳 256 个字符,包括重音字母和制表符等。
In ASCII, the uppercase letter ‘A’ is represented by the decimal value 65, which in binary is 0100 0001. The lowercase ‘a’ is 97 (0110 0001). The difference of 32 between upper‑ and lowercase is a deliberate design, making case conversion as simple as toggling one bit.
在 ASCII 中,大写字母 ‘A’ 对应的十进制值为 65,二进制为 0100 0001。小写 ‘a’ 为 97(0110 0001)。大小写之间相差 32,这是有意设计,使大小写转换只需翻转一个二进制位。
Unicode was developed to support global scripts and symbols. It uses up to 32 bits per character and can encode over a million code points, including emoji and mathematical symbols. UTF‑8 is a popular Unicode encoding that is backward‑compatible with ASCII.
Unicode 的开发是为了支持全球文字和符号。它每个字符最多使用 32 位,可编码超过百万个码点,包括表情符号和数学符号。UTF‑8 是一种流行的 Unicode 编码,与 ASCII 向后兼容。
10. Binary in Image Representation | 图像中的二进制表示
Bitmap images are made of a grid of pixels, each assigned a binary value representing its colour. The number of bits used per pixel is called the colour depth (or bit depth). A 1‑bit image can show only two colours (black and white), while an 8‑bit image can display 2⁸ = 256 colours, and a 24‑bit image around 16.7 million colours.
位图图像由像素网格组成,每个像素被赋予一个表示其颜色的二进制值。每个像素使用的位数称为颜色深度(色深)。1 位图像只能显示两种颜色(黑与白),8 位图像可显示 2⁸ = 256 种颜色,而 24 位图像约 1670 万色。
Resolution, measured in pixels width × height, together with colour depth determines image quality and file size. The size of a raw bitmap can be estimated as: width × height × colour depth in bits. For example, a 100×100 pixel image at 24‑bit colour requires 100×100×24 = 240,000 bits, which is 30,000 bytes (approx. 29.3 KB).
分辨率(以像素宽度×高度衡量)与颜色深度共同决定图像质量和文件大小。原始位图的大小可估算为:宽度×高度×颜色深度(位)。例如,100×100 像素、24 位颜色的图像需要 100×100×24 = 240,000 位,即 30,000 字节(约 29.3 KB)。
Metadata like width, height and colour depth is stored in the file header so the computer can correctly reconstruct the image. Lossy compression (e.g. JPEG) reduces file size by discarding some colour information, while lossless compression preserves all data.
文件头中存储宽度、高度和颜色深度等元数据,以便计算机正确重建图像。有损压缩(如 JPEG)通过舍弃部分颜色信息来缩减文件大小,而无损压缩则保留所有数据。
11. Binary Logic Gates | 二进制逻辑门基础
At the hardware level, binary 1 represents a high voltage (true) and 0 a low voltage (false). Logic gates are simple electronic circuits that perform Boolean operations on one or more binary inputs to produce a single binary output. The three fundamental gates are AND, OR and NOT.
在硬件层面,二进制 1 表示高电压(真),0 表示低电压(假)。逻辑门是简单的电子电路,对一个
Published by TutorHao | GCSE Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply