CS 350 Exam1 s08 soln

CS 350 Exam1 s08 soln - Name CS 350 Computer Organization...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Name________________________________________________________ CS 350 Computer Organization and Assembly 2/27/08 Open books, notes (No electronic devices!) 75 minutes You will answer all 4 problems. Show all work and state all assumptions! Question 1 (30 pts total) 1. You are creating a GBA game that will display a special message when the up arrow, right arrow and left shoulder buttons are pushed simultaneously. The button pushes are stored in an unsigned short called Buttons where the up arrow status is stored in bit 6, the right arrow status is stored in bit 4 and the left shoulder status is stored in bit 8. Bit 0 is the least significant bit. Remember that when a button is pushed the corresponding status bit is set to zero. a. (15 points) Write a procedure (in English not C) involving a single mask value and one or more logic operations to check whether all three of the buttons are being pushed. Your last statement should evaluate to TRUE if all three buttons are being pushed
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 5

CS 350 Exam1 s08 soln - Name CS 350 Computer Organization...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online