Question: Section B . The Sequence - The steps in a sequence are generated using a Pseudo - Random Number Generator ( PRNG ) . This
Section B The Sequence
The steps in a sequence are generated using a PseudoRandom Number Generator
PRNG This PRNG is implemented using a LinearFeedback Shift Register LFSR
with the mask: MASK xECAB. The initial state of the LFSR represents the
seed of the PRNG which must be initialised with your student number, encoded as a
bit hexadecimal literal.
Example:
Student number: n STATELFSR x
Student number: n STATELFSR x
Each step is derived from STATELFSR through the following algorithm:
BIT lsbitSTATELFSR
STATELFSR STATELFSR
if BIT
STATELFSR STATELFSR xor MASK
STEP STATELFSR and b
The value of STEP specifies the tone to be played and the segments to be
illuminated. STEP means that Ehigh is to be played and segments EF are to be
illuminated on DIGIT The user must then press pushbutton S to reproduce this
step. Similarly, STEP means that C is played and segments BC are illuminated
on DIGIT and so on
Upon successfully reproducing a sequence of steps, the sequence of steps in the next
turn will contain the same steps as in the current sequence, with an additional step
added to the end.
If the user fails to match Simons sequence, the game will restart, and a new
sequence will be generated. This new sequence will commence from where the
current sequence ended.
Example:
Assume the seed x where the user has reached turn with the
sequence and expected subsequent sequence If the user
incorrectly enters a instead of a on the th step, the game will end and restart
from the th step. The sequence in the next turn will then have a length of one and
consist of the step
Upon system reset, the seed must be set back to its initial value, allowing the Simon
game to be replayed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
