📚 Year 10 Edexcel Computer Science: Unit Test Mock Paper Walkthrough | 英国Edexcel十年级计算机科学:单元测试模拟卷解析
Welcome to this detailed walkthrough of a typical Year 10 Edexcel Computer Science unit test mock paper. We’ll explore question types across core topics such as algorithms, data representation, hardware, networks, and programming fundamentals. Each section presents a sample question followed by a clear solution, helping you build confidence for school assessments.
欢迎阅读这份详尽的英国Edexcel十年级计算机科学单元测试模拟卷解析。我们将探讨核心专题中的典型题型,包括算法、数据表示、硬件、网络和编程基础。每个小节都先展示一道样题,再给出清晰的解答,帮助你把校内测验准备得更加充分。
1. Understanding Algorithms and Flowcharts | 理解算法与流程图
Question: A program uses the flowchart below. When the user inputs 15, what is the output?
问题: 某程序使用如下流程图。当用户输入15时,输出结果是什么?
The diamond symbol asks: Is the number less than 10? If yes, output “Cold”. If no, the process moves to the next decision: Is the number greater than 30? If yes, output “Hot”. Otherwise, output “Warm”. Since 15 is not less than 10 and not greater than 30, it falls into the else path, printing “Warm”.
菱形符号判断:数字是否小于10?如果是,则输出 “Cold”。若否,流程进入下一个判断:数字是否大于30?若是,输出 “Hot”。否则,输出 “Warm”。因为15不小于10且不大于30,所以走向否分支,打印 “Warm”。
Flowcharts test logical tracing. Always trace with the given input step by step, noting each decision outcome.
流程图测试逻辑跟踪能力。务必根据给定输入逐步跟踪,记下每个判断的结果。
2. Tracing a Pseudocode Algorithm | 伪代码算法跟踪
Question: Consider the following pseudocode:
count ← 0
FOR i ← 1 TO 5
IF i MOD 2 = 0 THEN
count ← count + i
ENDIF
ENDFOR
OUTPUT count
What is the final value of count?
问题: 分析以下伪代码,count 最终的值是多少?
We initialise count to 0. The loop runs for i = 1, 2, 3, 4, 5. The condition i MOD 2 = 0 checks for even numbers. For i=2, count becomes 0+2=2. For i=4, count becomes 2+4=6. No other value is added. Thus, the output is 6.
初始化 count 为 0。循环遍历 i = 1, 2, 3, 4, 5。条件 i MOD 2 = 0 检测偶数。i=2 时,count = 2;i=4 时,count = 6。最终输出 6。
Pay close attention to indentation in pseudocode; it shows which statements belong to which block. MOD returns the remainder, so i MOD 2 = 0 identifies even i.
注意伪代码中的缩进,它表明了语句所属的代码块。MOD 返回余数,因此 i MOD 2 = 0 用来识别偶数。
3. Binary to Decimal Conversions | 二进制转十进制
Question: Convert the 8-bit binary number 10110110₂ into denary. Show your working.
问题: 将8位二进制数 10110110₂ 转换为十进制。写出计算过程。
We write place values from left (128) to right (1): 128, 64, 32, 16, 8, 4, 2, 1. Multiply each bit by its place value and sum:
1×128 + 0×64 + 1×32 + 1×16 + 0×8 + 1×4 + 1×2 + 0×1
= 128 + 0 + 32 + 16 + 0 + 4 + 2 + 0 = 182.
写出从左到右的位值:128, 64, 32, 16, 8, 4, 2, 1。每位数乘位值后求和:1×128 + 0×64 + 1×32 + 1×16 + 0×8 + 1×4 + 1×2 + 0×1 = 182。
| Bit | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 |
| Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
This method works for any binary length. Remember that the leftmost bit is the most significant bit (MSB).
这种方法适用于任意长度的二进制数。记住最左边的位是最高有效位(MSB)。
4. Hexadecimal Representation | 十六进制表示法
Question: The denary number 215 is stored in a computer register. Express it as a two-digit hexadecimal value.
问题: 十进制数 215 存储在计算机寄存器中。用两位十六进制数表示。
Divide 215 by 16 to find how many 16s there are. 215 ÷ 16 = 13 remainder 7. The quotient 13 represents D in hex, and the remainder 7 is 7. So hexadecimal = D7.
215 除以 16 得到商 13 余 7。商 13 对应十六进制数字 D,余数 7 就是 7。因此十六进制是 D7。
Alternatively, convert to binary first: 215 = 11010111₂, then split into nibbles: 1101₂ = D, 0111₂ = 7. Both ways are exam-friendly.
也可以先转换成二进制:215 = 11010111₂,再分成半字节:1101₂ = D,0111₂ = 7。两种方法考场上都适用。
When writing hex, always use uppercase letters A-F and ensure you have the correct number of digits for the register size.
书写十六进制时务必使用大写字母 A-F,并根据寄存器大小确保位数正确。
5. Data Storage Units and Calculations | 数据存储单位与计算
Question: A camera takes photos of size 4.5 MB each. How many such photos can be stored on a 2 GB memory card? (1 GB = 1000 MB in this context)
问题: 一台相机每张照片大小为 4.5 MB。一张 2 GB 存储卡能存放多少张这样的照片?(本题中 1 GB = 1000 MB)
First convert 2 GB to MB: 2 × 1000 = 2000 MB. Then divide total space by size per photo: 2000 ÷ 4.5 ≈ 444.44. Since you cannot store a fraction of a photo, the maximum whole number of photos is 444.
先将 2 GB 转换为 MB:2 × 1000 = 2000 MB。然后总容量除以每张照片大小:2000 ÷ 4.5 ≈ 444.44。因为不能存储不完整的照片,最多可存 444 张。
Be careful with unit conversions: in exams, storage is often treated as powers of 10 (kB=1000 bytes, MB=1000 kB), but check the question. If binary prefixes (kibibyte, etc.) are required, 1 KiB = 1024 bytes.
注意单位换算:考试中存储单位通常按10的幂次计算(kB=1000 B, MB=1000 kB),但请审题确认。若要求用二进制前缀(kibibyte 等),则 1 KiB = 1024 字节。
6. Network Topologies and Protocols | 网络拓扑与协议
Question: A school has installed a star network in its computer lab. Describe one advantage and one disadvantage of the star topology.
问题: 某校的计算机实验室采用了星型网络。阐述星型拓扑的一个优点和一个缺点。
Advantage: If one cable fails, only the single connected computer is affected; the rest of the network remains operational. This makes troubleshooting easier because faults can be isolated quickly.
优点:如果某一条网线损坏,只有与之相连的单台电脑受影响,网络中其他设备照常工作。故障可以很快被隔离出来,排错更容易。
Disadvantage: The entire network depends on the central switch or hub. If that device fails, the whole network goes down. Also, star networks require more cabling than bus networks.
缺点:整个网络依赖中心交换机或集线器。一旦中心设备出故障,全网瘫痪。此外,星型网络比总线型需要更多网线。
Common protocols like TCP/IP and HTTP often appear in the same topic. For instance, TCP ensures reliable, ordered delivery of data packets, while HTTP is used for transferring web pages.
同一专题里经常出现 TCP/IP 和 HTTP 等协议。比如,TCP 用于保证数据包可靠、有序地传输,HTTP 则用于传送网页。
7. Cybersecurity Threats and Prevention | 网络安全威胁与防护
Question: Explain what a phishing attack is and give two pieces of advice users should follow to avoid falling victim to it.
问题: 解释什么是钓鱼攻击,并给出两条建议,帮助用户避免上当受骗。
Phishing is a social engineering attack where criminals send emails or messages that appear to come from legitimate companies. They trick users into revealing personal data like passwords or bank details by linking to fake websites.
钓鱼攻击是一种社会工程攻击,犯罪分子发送看似来自正规公司的电子邮件或消息。他们通过指向伪造网站的链接,诱骗用户泄露密码或银行资料等个人信息。
Advice: (1) Always check the sender’s email address and the URL of any link; look for small spelling errors. (2) Never click on suspicious links or download attachments from unknown sources.
建议:(1) 始终检查发件人邮箱地址和链接的 URL,留意微小的拼写错误。 (2) 切勿点击可疑链接或下载来自不明来源的附件。
Other threats like malware, brute force attacks, and SQL injection are also part of the syllabus. Ensure you can distinguish between them and suggest appropriate defences (firewalls, strong passwords, input sanitisation).
大纲还涵盖恶意软件、暴力攻击和 SQL 注入等其他威胁。务必能区分它们,并给出恰当的防护措施(防火墙、强密码、输入清理)。
8. Logic Gates and Truth Tables | 逻辑门与真值表
Question: Draw the truth table for a circuit with inputs A and B followed by a NOT gate on B, then an AND gate taking A and NOT B as its inputs.
问题: 画出以下电路的真值表:输入 A 和 B,B 先经过一个非门,然后将 A 和 非B 作为与门的输入。
First, compute NOT B (¬B) for each possible pair. Then compute AND of A and ¬B:
| A | B | ¬B | Output (A AND ¬B) |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
Thus the output is 1 only when A=1 and B=0. This represents the logical expression A AND NOT B.
先计算每种组合下的 ¬B,再求 A AND ¬B。输出仅在 A=1 且 B=0 时为 1。该表达式为 A AND NOT B。
Be methodical: list all input combinations (usually 2ⁿ rows for n inputs). In exams, you might need to construct a logic diagram from an expression or vice versa.
要有条理:列出所有输入组合(n 个输入通常为 2ⁿ 行)。考试中可能要求从表达式构造逻辑图,或反过来。
9. Error Detection and Correction | 错误检测与纠正
Question: An 8-bit byte is transmitted with even parity as the 9th bit. The received data is: 1 0 1 1 0 1 0 0 and parity bit 1. Has an error occurred? Explain.
问题: 一个8位字节以偶校验方式传输,第9位是校验位。接收端数据为:1 0 1 1 0 1 0 0,校验位 1。是否有误?请解释。
Count the number of 1s in the 8 data bits: bits are 1,0,1,1,0,1,0,0 → four 1s, which is even. With even parity, the parity bit should make the total number of 1s across all 9 bits even. The received parity bit is 1, making total 1s = 4+1 = 5 (odd). This violates even parity, so an error has occurred.
数一下8位数据中1的个数:1,0,1,1,0,1,0,0 → 四个 1,是偶数。偶校验要求全部9位中 1 的总数为偶数。接收到的校验位是 1,因此总数 4+1=5(奇数)。这违反了偶校验规则,所以发生了错误。
Parity can only detect odd numbers of bit errors. For more robust detection, checksums or cyclic redundancy checks (CRC) are used.
奇偶校验只能检测出奇数个比特错误。若需更可靠的检测,可使用校验和或循环冗余校验(CRC)。
10. Programming Constructs: Sequence, Selection, Iteration | 编程结构:顺序、选择、迭代
Question: A program needs to repeatedly ask a user to enter a password until the correct one ‘TutoR2025’ is entered. Identify the programming construct used and suggest how to implement it in pseudocode.
问题: 某程序需反复要求用户输入密码,直至输入正确的 ‘TutoR2025’。指明所用编程结构,并给出伪代码实现建议。
This requires an iteration (loop) with a condition, often called a condition-controlled loop. A suitable construct is WHILE…ENDWHILE or REPEAT…UNTIL. Pseudocode:
SET password TO ''
WHILE password ≠ 'TutoR2025' DO
SEND 'Enter password' TO DISPLAY
RECEIVE password FROM KEYBOARD
ENDWHILE
这里需要用带条件的迭代(循环),常称为条件控制循环。合适的结构是 WHILE…ENDWHILE 或 REPEAT…UNTIL。伪代码如下:设置 password 初始为空,只要 password 不等于 ‘TutoR2025’ 就提示输入并接收值。
Sequence, selection (IF…THEN…ELSE) and iteration (FOR, WHILE) are the three building blocks of structured programs. Be prepared to combine them in trace questions.
顺序、选择(IF…THEN…ELSE)和迭代(FOR、WHILE)是结构化程序的三大积木。面对跟踪类题目时,要能结合使用它们。
11. Testing and Debugging Code | 测试与调试代码
Question: A programmer wrote a function intended to return the largest of three numbers, but it fails for inputs (5, 5, 3). Explain why boundary testing is important and suggest a suitable test case.
问题: 一位程序员编写了一个返回三个数中最大值的函数,但输入(5, 5, 3)时出错。解释边界测试的重要性,并提出一个合适的测试用例。
Boundary testing examines inputs at the edges of acceptable ranges or where behaviour changes. In this example, the fault appears when the largest value is tied (equal values). A good boundary test case would be (5, 5, 5) or (0, 0, 1), because the code must handle equal maximums correctly.
边界测试检验输入在有效范围的边界处或行为会改变的地方。本例中,当最大值平局时故障显现。良好的边界测试用例可以是(5, 5, 5)或(0, 0, 1),因为代码必须正确处理相等最大值的情形。
Normal, erroneous, and extreme data should all be part of a test plan. Debugging involves finding and fixing errors, often using trace tables or print statements to check variable states.
测试计划应包含正常、错误和极端数据。调试指寻找并修复错误,常借助追踪表或打印语句检查变量状态。
12. Exam Tips and Common Mistakes | 考试技巧与常见错误
Read every question twice and underline key terms like ‘state’, ‘describe’, ‘explain’, or ‘convert’. If you are asked to show working, always include the steps in your answer booklet—marks are often awarded for method even if the final answer is slightly wrong.
每道题读两遍,圈出 ‘state’、’describe’、’explain’ 或 ‘convert’ 等关键词。如果要求写出过程,务必在答题册上展示步骤——即使最终答案有小错,通常也能按步得分。
Common mistakes: forgetting to convert units in storage calculations, misreading pseudocode operator precedence, and writing incomplete truth tables. Practise past paper questions under timed conditions to improve speed.
常见错误:存储计算时忘记单位换算,误读伪代码中的运算符优先级,以及写出不完整的真值表。在限时条件下练习往届真题,提升答题速度。
For programming questions, neat indentation in pseudocode improves readability. In logic circuit questions, draw clear gate symbols and label intermediate outputs.
对于编程题,整洁的伪代码缩进能提升可读性。在逻辑电路题中,画清晰的门符号并标注中间输出。
Published by TutorHao | 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