📚 Year 12 OCR Computer Science: Unit Test Mock Paper Analysis | OCR计算机 Year 12 单元测试模拟卷解析
Welcome to this detailed walkthrough of a Year 12 OCR Computer Science unit test mock paper. We will break down each question type, explore common pitfalls, and reinforce the essential knowledge required for success in the AS-level components. This analysis is designed to help you understand how to apply theory to exam-style problems, covering topics from data representation and Boolean algebra to networking and legal considerations.
欢迎阅读这篇针对 Year 12 OCR 计算机科学单元测试模拟卷的详细解析。我们将逐一拆解各类题型,探讨常见错误,并巩固在 AS 阶段取得成功所必需的核心知识。本解析旨在帮助你理解如何将理论应用到考试风格的问题中,涵盖数据表示、布尔代数、网络及法律等诸多主题。
1. Mock Paper Structure and Topics Covered | 模拟试卷结构与覆盖主题
The mock paper consists of two sections: a short-answer section with compulsory questions and a second section requiring more extended writing. It is designed to mimic the OCR AS Computer Science H046/01 paper. Questions cover the full spectrum of Year 12 content: binary calculations, logic circuits, operating system functions, trace tables, database normalisation, network models, cybersecurity, and ethical implications of computing.
模拟卷包含两个部分:一部分是必答的简答题,另一部分则要求较长的论述。它旨在模拟 OCR AS 计算机科学 H046/01 试卷。题目覆盖 Year 12 的全部内容:二进制计算、逻辑电路、操作系统功能、跟踪表、数据库规范化、网络模型、网络安全以及计算机的伦理影响。
By analysing each question, you will learn how to interpret command words such as ‘describe’, ‘explain’, ‘complete’, and ‘evaluate’. Time management is also critical: you should allocate approximately one minute per mark. The paper totals 70 marks, to be answered in 1 hour 15 minutes.
通过分析每道题,你将学会如何解读诸如“描述”、“解释”、“完成”和“评估”等指令词。时间管理同样重要:你应该大约按每分1分钟分配时间。试卷满分70分,需在1小时15分钟内完成。
2. Question 1: Binary Arithmetic and Normalisation | 题目1:二进制算术与规格化
Question: Represent the decimal number -27.375 as a normalised floating-point binary number using an 8-bit two’s complement mantissa followed by a 4-bit two’s complement exponent.
题目:使用8位补码尾数和4位补码指数,将十进制数 -27.375 表示为规格化的浮点二进制数。
Step 1: Convert the magnitude 27.375 to binary. 27 in binary is 11011₂. The fractional part 0.375 is 0.011₂ (since 0.25+0.125=0.375). Therefore, 27.375₁₀ = 11011.011₂.
步骤1:将绝对值27.375转换为二进制。27的二进制是11011₂。小数部分0.375为0.011₂(因为0.25+0.125=0.375)。因此,27.375₁₀ = 11011.011₂。
Step 2: Normalise the positive binary number. Move the binary point five places to the left to obtain the form 0.11011011 × 2⁵. The mantissa for the positive number is 0.11011011 (filling to 8 bits would be 0.1101101 with truncation; we will use 0.1101101 for 8-bit precision). The exponent is +5, which in 4-bit two’s complement is 0101.
步骤2:将正二进制数规格化。将小数点左移五位得到 0.11011011 × 2⁵ 的形式。正数的尾数为0.11011011(截断至8位为0.1101101,我们将使用8位精度0.1101101)。指数为+5,其4位补码为0101。
Step 3: Apply two’s complement to the mantissa to obtain the negative number. Invert the bits of the positive mantissa 0.1101101 → 1.0010010, then add 1: 1.0010010 + 1 = 1.0010011. The 8-bit mantissa is therefore 10010011₂.
步骤3:对尾数应用补码以获得负数。对正尾数0.1101101求反:1.0010010,然后加1:1.0010010 + 1 = 1.0010011。因此8位尾数为10010011₂。
Step 4: The exponent remains +5 (0101). Check that the mantissa starts with ’10’, which satisfies normalisation for a negative two’s complement mantissa. The final 12-bit representation is: 10010011 0101.
步骤4:指数保持+5(0101)。检查尾数以“10”开头,满足负数补码尾数的规格化要求。最终的12位表示为:10010011 0101。
Common pitfall: forgetting to increment the exponent after normalisation, or using the wrong sign for the exponent. Always confirm that the mantissa lies in the range 0.5 ≤ |m| < 1 (for positive: 01…, for negative: 10…).
常见陷阱:规格化后忘记调整指数,或使用错误的指数符号。请始终确认尾数满足 0.5 ≤ |m| < 1(正数:01…,负数:10…)。
3. Question 2: Logic Gates and Truth Tables | 题目2:逻辑门与真值表
Question: Draw the truth table for the logic expression Q = ¬(A ∧ B) ∨ (C ∧ ¬A). Identify a single logic gate that could replace the circuit if C is permanently held at logic 1.
题目:画出逻辑表达式 Q = ¬(A ∧ B) ∨ (C ∧ ¬A) 的真值表。若 C 长期保持为逻辑 1,找出可以替代该电路的单一逻辑门。
We will construct the truth table for three inputs A, B, C (2³ = 8 rows). Intermediate columns help to derive Q.
我们将为三个输入 A、B、C(2³ = 8行)绘制真值表。中间列有助于推导 Q。
| A | B | C | A ∧ B | ¬(A ∧ B) | ¬A | C ∧ ¬A | Q |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
When C = 1, the term (C ∧ ¬A) simplifies to ¬A. The expression becomes Q = ¬(A ∧ B) ∨ ¬A. By De Morgan’s laws, ¬(A ∧ B) = ¬A ∨ ¬B, so Q = (¬A ∨ ¬B) ∨ ¬A = ¬A ∨ ¬B. This is equivalent to ¬(A ∧ B) again, but wait: ¬A ∨ ¬B = ¬(A ∧ B). With C=1, Q = ¬(A ∧ B) ∨ ¬A. Using absorption: ¬(A ∧ B) ∨ ¬A = ¬A ∨ ¬B ∨ ¬A = ¬A ∨ ¬B. This is a NAND gate with inputs A and B (¬(A ∧ B)), but look at the truth table with C=1: Q is 1 except when A=1 and B=1. That behaviour matches a NAND gate. Thus, a single NAND gate can replace the circuit.
当 C = 1 时,项 (C ∧ ¬A) 简化为 ¬A。表达式变为 Q = ¬(A ∧ B) ∨ ¬A。根据德摩根定律,¬(A ∧ B) = ¬A ∨ ¬B,因此 Q = (¬A ∨ ¬B) ∨ ¬A = ¬A ∨ ¬B。这等于 ¬(A ∧ B)。但使用吸收律:¬(A ∧ B) ∨ ¬A = ¬A ∨ ¬B。当 C=1 时查看真值表:除 A=1 且 B=1 外,Q 均为 1。该行为与与非门匹配。因此,一个与非门即可替代该电路。
4. Question 3: Operating Systems and Interrupts | 题目3:操作系统与中断
Question: Describe the steps taken by a CPU when an I/O interrupt occurs. Explain why interrupts are critical for multitasking operating systems.
题目:描述 I/O 中断发生时 CPU 采取的步骤。解释为何中断对于多任务操作系统至关重要。
When an I/O device needs attention, it sends an interrupt signal to the CPU via the interrupt controller. The CPU completes its current fetch–decode–execute cycle, then checks the interrupt register. If an interrupt is pending and its priority is higher than the current task, the CPU saves the contents of its registers, including the program counter, onto the system stack.
当 I/O 设备需要关注时,它通过中断控制器向 CPU 发送中断信号。CPU 完成当前取指-译码-执行周期后,检查中断寄存器。若有待处理中断且优先级高于当前任务,CPU 会将寄存器内容(包括程序计数器)保存到系统堆栈中。
The CPU then loads the address of the corresponding Interrupt Service Routine (ISR) from the interrupt vector table and begins executing it. After the ISR completes, the CPU restores the saved registers from the stack and resumes the original process. This mechanism ensures that slow I/O devices do not stall the processor, enabling efficient multitasking where the OS can schedule other processes while waiting for data.
然后 CPU 从中断向量表中加载相应中断服务程序(ISR)的地址并开始执行。ISR 完成后,CPU 从堆栈恢复所保存的寄存器,并继续执行原进程。这种机制确保低速 I/O 设备不会拖慢处理器,实现高效多任务处理,让操作系统在等待数据时能够调度其他进程。
Without interrupts, the CPU would have to rely on polling, which wastes processing time by constantly checking device status. Interrupt-driven I/O is the cornerstone of modern pre-emptive multitasking, allowing the OS to react to hardware events almost instantly.
若无中断,CPU 只能依赖轮询,这会因不断检查设备状态而浪费处理时间。中断驱动的 I/O 是现代抢占式多任务的基石,使得操作系统能够几乎即时响应硬件事件。
5. Question 4: Programming Constructs and Trace Tables | 题目4:编程结构与跟踪表
Question: Complete the trace table for the following pseudocode, given initial values a = 4, b = 9. Indicate the output.
题目:给定初始值 a = 4, b = 9,完成以下伪代码的跟踪表,并指示输出。
- while a < b
- a = a + 1
- b = b – 2
- endwhile
- print(a, b)
We trace each iteration carefully. The table headers: iteration, a (start), b (start),
Published by TutorHao | Year 12 Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导