Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You must show your mathematical working for full marks. a.Donkey Kong is an arcade game where an animated figure, Mario, jumps over barrels. In the

    You must show your mathematical working for full marks.

    a.Donkey Kong is an arcade game where an animated figure, Mario, jumps over barrels. In the original game, it was virtually impossible to get through to Level 22 before Mario was ‘killed’ by the game. This was an unintended consequence of how the number of bonus points was calculated and stored.

    The number of bonus points a player starts with when they move onto a new level depends on the number of the level that they are moving onto. Behind the scenes, Donkey Kong takes the level that is about to be entered, multiplies it by 10 and adds 40, thus yielding the first two digits of the player’s starting bonus.

    So, for example, if a player is about to start Level 2, the bonus number is calculated like this:

    2 × 10 + 40 = 60.

    This bonus number is stored in a single byte as an unsigned integer. The bonus number will never be 0.

    i.Write down and evaluate an expression for the number of different unsigned integers that can be represented in a single byte. Then write down the largest unsigned integer that can be represented if no representation for 0 is required.

    ii.Find the bonus number associated with Level 22. Explain why storing this bonus number will cause a problem.

    iii.For Level 22, the bonus number actually stored is 4. Give one likely explanation for this. iv.The bonus number is multiplied by 100 before it is displayed on the screen, so for Level 22 the number displayed on the screen is 400. The displayed number decreases by 100 every 1.75 seconds. When the displayed number reaches 0, Mario is automatically killed. How many seconds does the player have to finish Level 22?

Step by Step Solution

3.53 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

i 1 byte 8 bits either a signed or an unsigned integer can be stored using the storage allotted i... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions