IB WJEC Computer Science: Typical Exam Questions Explained | IB WJEC 计算机:典型例题详解

📚 IB WJEC Computer Science: Typical Exam Questions Explained | IB WJEC 计算机:典型例题详解

Computer Science examinations often require students to apply theoretical knowledge to solve practical problems. This article presents a selection of typical exam questions from IB and WJEC syllabi, covering topics such as data representation, Boolean logic, algorithms, databases, networking, and system architecture. Each question is followed by a detailed step-by-step solution in both English and Chinese to help you master the concepts and exam techniques.

计算机科学考试通常要求学生将理论知识应用于解决实际问题。本文精选了来自IB和WJEC课程大纲的典型例题,涵盖了数据表示、布尔逻辑、算法、数据库、网络和系统体系结构等主题。每个问题都附有详细的分步解答,提供中英双语对照,助你掌握概念与应试技巧。

1. Binary Addition and Two’s Complement Overflow | 二进制加法与补码溢出判断

Question: Add the 8-bit signed binary numbers 01101010 and 01011101 using two’s complement representation. Write down the 8-bit result and determine whether an overflow occurs.

问题:使用补码表示计算8位有符号二进制数 01101010 与 01011101 的和,写出8位结果并判断是否发生溢出。

Step 1: Align the two binary numbers vertically, with the least significant bit on the right.

步骤1:将两个二进制数上下对齐,最低有效位在右侧。

Step 2: Add bit by bit from right to left, carrying when the sum is 2 or 3.

步骤2:从右向左逐位相加,当和为2或3时产生进位。

Addition process:

加法过程:

01101010
+ 01011101
———–
11000111

Step 3: Identify the most significant bit (MSB) of each operand and the result. Here both operands have MSB = 0 (positive numbers). The result has MSB = 1, which in two’s complement indicates a negative number. The sum of two positive numbers cannot be negative, so overflow has occurred.

步骤3:识别每个操作数及结果的最高有效位。此处两个操作数 MSB 均为 0(正数),结果 MSB 为 1(负数)。两个正数相加不可能得到负数,因此发生了溢出。

Step 4: Alternatively, check the carry into and out of the MSB. The carry into the MSB (bit 7) is 1, and the carry out of the MSB is 0. Since they are different, overflow is confirmed.

步骤4:另一种方法是检查符号位的进位输入与进位输出。进入位7的进位为1,离开位7的进位为0。两者不同,证实溢出。


2. Hexadecimal to Binary and Denary Conversion | 十六进制与二进制、十进制互转

Question: Convert the hexadecimal number 2F5A16 into its 16-bit binary equivalent and its denary (decimal) value.

问题:将十六进制数 2F5A16 转换为16位二进制形式和十进制数值。

Step 1: Write each hex digit as a 4-bit binary nibble. 2 → 0010, F → 1111, 5 → 0101, A → 1010.

步骤1:将每个十六进制数字写作4位二进制半字节。2 → 0010,F → 1111,5 → 0101,A → 1010。

Step 2: Concatenate the nibbles to form a 16-bit number: 0010 1111 0101 1010.

步骤2:拼接各个半字节构成16位二进制数:0010 1111 0101 1010。

Step 3: To find the denary value, expand using powers of 16: 2×16³ + 15×16² + 5×16¹ + 10×16⁰ = 2×4096 + 15×256 + 5×16 + 10 = 8192 + 3840 + 80 + 10 = 12122.

步骤3:求十进制值时,按16的幂展开:2×16³ + 15×16² + 5×16¹ + 10×16⁰ = 8192 + 3840 + 80 + 10 = 12122。

Thus the binary is 0010111101011010 and the denary value is 12122.

因此二进制为 0010111101011010,十进制值为12122。


3. Simplifying Boolean Expressions using Algebra | 用代数法化简布尔表达式

Question: Simplify the Boolean expression F = A’B’C + A’BC + AB’C + ABC’ using Boolean algebra laws. Show each step.

问题:运用布尔代数定律化简表达式 F = A’B’C + A’BC + AB’C + ABC’,并给出步骤。

Step 1: Group terms that share common factors. Notice (A’B’C + A’BC) = A’C(B’ + B) = A’C(1) = A’C, by the Complement law.

步骤1:将含有公共因子的项分组。注意到 (A’B’C + A’BC) = A’C(B’ + B) = A’C(1) = A’C,依据互补律。

Step 2: Now examine the remaining terms AB’C and ABC’. There is no single common factor, but we can factor A: A(B’C + BC’) = A(B XOR C).

步骤2:考察剩余项 AB’C 和 ABC’。没有单一的公共因子,但可提出因子A:A(B’C + BC’) = A(B XOR C)。

Step 3: The simplified expression is F = A’C + A(B XOR C). This is a valid minimal sum-of-products form.

步骤3:化简后的表达式为 F = A’C + A(B XOR C)。这是一个有效的最简积之和形式。

Alternative simplification using a Karnaugh map would yield the same result.

使用卡诺图化简会得到相同结果。


4. Trace Table for Iterative Pseudocode | 迭代伪代码的跟踪表

Published by TutorHao | IB 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