Mock Simulation Year11
Mock Simulation Year11
Pearso
n
Edexcel
Instructions
Use black ink or a ball-point pen. Use of correction fluid is not allowed.
Fill in the boxes at the top of the page.
Answer all the questions
there may be more space than you need.
Answer the questions in the space provided.
Information
The total mark for this paper is 48.
The marks for each question are shown in brackets.
use this as a guide as to how much time to spend on each question.
Advice
Read each question carefully before you answer it.
Keep an eye on the time.
Try to answer every question.
Check your answers if you have time at the end.
1.................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.......................................................................
2.................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.......................................................................
(a) Complete the table by adding the hexadecimal notation for each of the
denary values. (2)
Denary Hexadecimal
(b) Identify the expression to give the number of unique binary patterns that can be
stored in six bits. (1)
(c) Binary patterns are manipulated by shifts.
(i) Give the result of applying a logical shift right by two to the binary
(ii) Here is a binary bit pattern for a signed integer in sign and magnitude format.
1001 0110
(b) Data packets contain the addresses of the sender and the receiver.
Complete the table to give the number of bits that make up each type of
network address. (2)
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
..............
Complete the diagram to show the names of the components in the correct order. (3)
(e) Users enter passwords when logging onto a network and when creating accounts
using a web page.
Describe one difference between validation and authentication. (2)
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
....................................................
(e) A computer with a single CPU runs several processes at the same time.
This computer is multitasking.
Describe how the operating system enables processes to share a single CPU.(2)
..................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................
Justification.................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................
(b) Figure 1 shows an algorithm that displays a string based on the number input by
the user.
1 SEND ("Enter a number: ") TO DISPLAY
2 RECEIVE inNum FROM (INTEGER) KEYBOARD
3 IF ((inNum = 1) OR (inNum = 2)) THEN
4 IF (inNum = 1) THEN
5 SEND ("First") TO DISPLAY
6 ELSE
7 IF (inNum = 2) THEN
8 SEND ("Second") TO DISPLAY
9 END IF
10 END IF
11 ELSE
12 SEND ("Invalid input") TO DISPLAY
13 END IF
Figure 1
Give one reason why the selection statement on line 7 is not required.(1)
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
.......................................................................
Figure 2
(i) Describe what happens to the variable oldIndex when line 5 is executed. (2)
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
..............................................................................................................................................
Coercion can be made explicit. For example, RECEIVE age FROM (INTEGER) KEYBOARD
assumes that the input from the keyboard is interpreted as an INTEGER, not a STRING.
Constants
The value of constants can only ever be set once. They are identified by the keyword
CONST. Two examples of using a constant are shown.
CONST REAL PI
SET PI TO 3.14159
SET circumference TO radius * PI * 2
Data structures
ARRAY
STRING
Indices start at zero (0) for all data structures.
All data structures have an append operator, indicated by &.
Using & with a STRING and a non-STRING will coerce to STRING. For example, SEND ‘Fred’
& age TO DISPLAY, will display a single STRING of ‘Fred18’.
3
Turn over
P72937A
Identifiers
Identifiers are sequences of letters, digits and ‘_’, starting with a letter, for example:
MyValue, myValue, My_Value, Counter2
Functions
LENGTH()
For data structures consisting of an array or string.
RANDOM(n)
This generates a random number from 0 to n.
Comments
Comments are indicated by the # symbol, followed by any text.
A comment can be on a line by itself or at the end of a line.
Devices
Use of KEYBOARD and DISPLAY are suitable for input and output.
Additional devices may be required, but their function will be obvious from the context.
For example, CARD_READER and MOTOR are two such devices.
Notes
In the following pseudocode, the < > indicates where expressions or values need to be
supplied. The < > symbols are not part of the pseudocode.
4 P72937A
Selection
Syntax Explanation of syntax Example
IF <expression> THEN
<command>
END IF
IF Answer = 10 THEN
SET Score TO Score + 1
END IF
IF <expression> THEN
<command>
ELSE
<command>
END IF
5
Turn over
P72937A
Repetition
Syntax Explanation of syntax Example
WHILE <condition> DO
<command>
END WHILE
WHILE Flag = 0 DO
SEND ‘All well’ TO DISPLAY
END WHILE
REPEAT
<command>
UNTIL <expression>
Post-conditioned loop.
Executes
<command> until <condition>
is true. The loop must execute
at least once.
REPEAT
SET Go TO Go + 1
UNTIL Go = 10
6 P72937A
Input/output
Syntax Explanation of syntax Example
SEND <expression> TO DISPLAY Sends output to the screen. SEND ‘Have a good day.’ TO
DISPLAY
File handling
Syntax Explanation of syntax Example
Subprograms
Syntax Explanation of syntax Example
PROCEDURE <id>
(<parameter>, ...)
BEGIN PROCEDURE
<command>
END PROCEDURE
Defines a procedure.
PROCEDURE CalculateAverage
(Mark1, Mark2, Mark3)
BEGIN PROCEDURE
SET Avg to (Mark1 + Mark2 +
Mark3)/3
END PROCEDURE
FUNCTION <id>
(<parameter>, ...)
BEGIN FUNCTION
<command>
RETURN <expression>
END FUNCTION
Defines a function.
FUNCTION AddMarks (Mark1,
Mark2, Mark3)
BEGIN FUNCTION
SET Total to (Mark1 + Mark2 +
Mark3)/3
RETURN Total
END FUNCTION
P72937A 7
Arithmetic operators
Symbol Description
+ Add
- Subtract
/ Divide
* Multiply
^ Exponent
MOD Modulo
DIV Integer division
Relational operators
Symbol Description
= equal to
<> not equal to
> greater than
>= greater than or equal to
< less than
<= less than or equal to
Logical operators
Symbol Description
AND Returns true if both conditions
are true.
NOT