Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started