📚 A-Level OCR Computer Science: Binary In-Depth Revision | A-Level OCR 计算机:二进制 考点精讲
In the OCR A-Level Computer Science specification (H446), binary arithmetic is fundamental to understanding how data is represented and manipulated inside a computer system. This comprehensive revision guide works through every binary topic the examiner can test: place values, binary-to-denary and denary-to-binary conversion, hexadecimal, binary addition and overflow, shifts, sign and magnitude, two's complement, fixed point and floating point representation, normalisation, and the trade-off between range and precision. Each section pairs the theory with worked examples so you can reproduce the marks under exam conditions.
在 OCR A-Level 计算机科学大纲(H446)中,二进制运算是理解数据在计算机系统中如何表示和处理的基础。本综合复习指南覆盖考官可能考查的全部二进制考点:位值、二进制与十进制互转、十六进制、二进制加法与溢出、移位、原码、补码、定点与浮点表示、规格化,以及范围与精度的权衡。每个小节都把理论和工作示例配对讲解,帮助你在考试条件下稳定拿分。
1. Binary Basics and Place Values | 二进制基础与位值
eases from right to left: ..., 2³, 2², 2¹, 2⁰. For example, the binary number 1101₂ equals 8 + 4 + 0 + 1 = 13 in denary. The leftmost bit is the most significant bit (MSB) and carries the largest weight; the rightmost bit is the least significant bit (LSB) and carries the smallest weight.
二进制是以 2 为基数的位值制数字系统,只使用 0 和 1 两个数字。每一位代表 2 的幂,位值从右向左递增:…、2³、2²、2¹、2⁰。例如,二进制数 1101₂ 等于 8 + 4 + 0 + 1 = 十进制的 13。最左边的位是最高有效位(MSB),权重最大;最右边的位是最低有效位(LSB),权重最小。
1101₂ = (1 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2⁰) = 8 + 4 + 0 + 1 = 13₁₀
A group of 4 bits is called a nibble, and a group of 8 bits is called a byte. In unsigned binary, one byte can represent values from 0 to 255. In general, n bits can represent 2ⁿ different values, ranging from 0 to 2ⁿ - 1.
4 位一组称为半字节(nibble),8 位一组称为一个字节(byte)。在无符号二进制中,一个字节可以表示 0 到 255 的数值。一般而言,n 位可以表示 2ⁿ 个不同的值,范围从 0 到 2ⁿ - 1。
OCR examiners frequently ask you to identify the MSB or LSB, or to state the number of values a given bit width can store. Always write the place values above the bits before doing any calculation; this single habit prevents most careless errors in conversion questions.
OCR 考官经常要求你指出 MSB 或 LSB,或者说明给定位宽可以表示多少个值。在做任何计算之前,先把位值写在二进制位上方;这个简单习惯可以避免绝大多数转换题中的粗心错误。
2. Binary to Denary Conversion | 二进制转十进制
2² + 1 × 2¹ + 0 × 2⁰ = 16 + 4 + 2 + 0 = 22. The same method applies to any bit width, such as 8-bit or 16-bit numbers.
要把无符号二进制整数转换为十进制,先在每一位上方写出位值,然后把所有数字位为 1 的位置对应的位值相加。对于 10110₂:1 × 2⁴ + 0 × 2³ + 1 × 2² + 1 × 2¹ + 0 × 2⁰ = 16 + 4 + 2 + 0 = 22。同一方法适用于任何位宽,例如 8 位或 16 位数字。
10110₂ = 16 + 4 + 2 = 22₁₀
a leading zero, as in 01101001₂, does not change the value; it only pads the number to a fixed width, which is required for arithmetic and for two's complement.
8 位示例:11010010₂ 在 128、64、16、2 这几列上是 1,因此等于 128 + 64 + 16 + 2 = 210。注意,像 01101001₂ 这样的前导零不会改变数值,它只是把数字补齐到固定位宽,而固定位宽是进行算术运算和使用补码的必要前提。
| Bit position | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
In extended answers, show your working line by line. A conversion question typically awards one mark for the correct answer and can award a method mark for a correctly written sum of place values, so never leave the answer blank if your final value looks wrong.
在解答题中,要逐行写出过程。转换题通常对正确答案给 1 分,也可能对正确写出的位值求和式给方法分,因此即使最终结果看起来有误,也不要留空。
3. Denary to Binary Conversion | 十进制转二进制
There are two reliable methods. The first is repeated division by 2: divide the denary number by 2, record the remainder, then divide the quotient by 2 again, and continue until the quotient is 0. The binary number is read from the last remainder back to the first.
有两种可靠的方法。第一种是反复除以 2:把十进制数除以 2,记下余数,再把商除以 2,如此反复直到商为 0。二进制数由最后一个余数往前读到第一个余数。
156 = 10011100₂
2 ÷ 2 = 1 remainder 0; 1 ÷ 2 = 0 remainder 1. Reading the remainders upwards gives 10011100₂, and checking back: 128 + 16 + 8 + 4 = 156.
以 156 为例:156 ÷ 2 = 78 余 0;78 ÷ 2 = 39 余 0;39 ÷ 2 = 19 余 1;19 ÷ 2 = 9 余 1;9 ÷ 2 = 4 余 1;4 ÷ 2 = 2 余 0;2 ÷ 2 = 1 余 0;1 ÷ 2 = 0 余 1。把余数从下往上读得到 10011100₂,回验:128 + 16 + 8 + 4 = 156。
The second method is the subtractive method: find the largest power of 2 that fits into the number, subtract it, place a 1 in that column, and repeat with the remainder until it reaches 0. Both methods are examinable, and the subtractive method is usually faster for numbers close to a power of 2, such as 250.
第二种方法是减法法:找出能放进该数的最大 2 的幂,减去它,在该列写 1,然后对余数重复该过程直到余数为 0。两种方法都在考纲内,对于接近 2 的幂的数(例如 250),减法法通常更快。
4. Hexadecimal Representation and Conversions | 十六进制表示与转换
our bits (one nibble) map onto one hexadecimal digit, which makes hexadecimal a compact and unambiguous shorthand for binary.
十六进制是以 16 为基数的数字系统,使用 16 个符号:0-9 和 A-F,其中 A = 10、B = 11、C = 12、D = 13、E = 14、F = 15。由于 16 = 2⁴,4 位(一个半字节)恰好对应一个十六进制数字,这使十六进制成为二进制紧凑且不易出错的简写形式。
| Hex | Denary | Binary | Hex | Denary | Binary |
| 0 | 0 | 0000 | 8 | 8 | 1000 |
| 1 | 1 | 0001 | style="border:1px solid #ccc;padding
广告 / Sponsored 现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC… 计算机 备考教辅 · 正版现货 · 与本文内容相关 查看详情 / View on Taobao参考价 ¥467.0更多咨询请联系16621398022(同微信) 备考资讯每日更新,关注不错过 考纲变化 · 科目分析 · 学习方法 ![]() 在微信里长按二维码识别关注 或截图后用「扫一扫 → 相册」选择本图 公众号:tutorhao |
