Computer architecture

Asked

Viewed 125 times

-6

Assuming a basic video game formed by a processor and a memory to store the game processing and input requests for a joystick, and that the ALU can add up to three different joystick input requests. The table below shows binary encodings with no flag, from each request for the joystick.

Requisição Código Requisição Código
Up 0010101 A 1001010
Down 1010101 B 1110101
Left 1101010 C 1001001
Right 0011101 Start 0010110

a) How much should ALU (width of variable w) support joystick requests so as to no overflow. The table below shows binary encodings with no flag for each request from joystick.

b) How to reduce production costs of a processor with lower capacity arithmetic, ie, 7 bits, explain technically, what would be the practical result in the game, if the player makes a combination that causes an overflow. Discuss.

  • Interesting statement... But what is the doubt?

  • 1

    It’s a job for us to solve?

  • Yes guys.. It’s a question of a proof that I found interesting and put here!

  • I already did, in the case posted here for the resourcefulness of the same question!

1 answer

0

a) 9 bits, which is the sum of the 3 largest values = 1 0011 0100

b) there are some coincidences in the sum of three entries, for example:

      0 0001 0101 + 0 0100 1010 + 0 0101 0101 = 
    = 0 0001 0110 + 0 0100 1001 + 0 0101 0101 = 0 1011 0100

discarding the "overflow" and using only the 7 bits: 011 0100

In addition, the sum of the UP, Start and C keys result in the B key if pressed alone.

result: with 7 bits or 9 bits the sum of the keys is not a good alternative, because there is coincidence in the result of some combinations.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.