Answered step by step
Verified Expert Solution
Link Copied!

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 Pseudo-Random Number Generator
(PRNG). This PRNG is implemented using a Linear-Feedback Shift Register (LFSR)
with the mask: MASK =0xE2023CAB. The initial state of the LFSR represents the
seed of the PRNG, which must be initialised with your student number, encoded as a
32-bit hexadecimal literal.
Example:
Student number: n12345678-> STATE_LFSR =0x12345678
Student number: n5556667-> STATE_LFSR =0x05556667
- Each step is derived from STATE_LFSR through the following algorithm:
BIT lsbit(STATE_LFSR)
STATE_LFSR STATE_LFSR >>1
if (BIT =1)
STATE_LFSR STATE_LFSR xor MASK
STEP STATE_LFSR and 0b11
- The value of STEP specifies the tone to be played and the segments to be
illuminated. STEP =0 means that E(high) is to be played and segments EF are to be
illuminated on DIGIT 1. The user must then press pushbutton S1 to reproduce this
step. Similarly, STEP =1 means that C is played and segments BC are illuminated
on DIGIT 1, 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 0x12345678 where the user has reached turn 7 with the
sequence 1341343 and expected subsequent sequence 13413432. If the user
incorrectly enters a 1 instead of a 3 on the 5th step, the game will end and restart
from the 8th step. The sequence in the next turn will then have a length of one and
consist of the step 2.
- 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

1. Identify three communication approaches to identity.

Answered: 1 week ago

Question

d. Who are important leaders and heroes of the group?

Answered: 1 week ago

Question

3. Describe phases of minority identity development.

Answered: 1 week ago