1)+List+3+hardcopy+devices,+explain+how+they+work,+and+discuss

1)+List+3+hardcopy+devices,+explain+how+they+work,+and+discuss

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

View Full Document Right Arrow Icon
Test 1 CSE 1520 2007-08W February 6, 2008 Page 1 of 11 1. York University Faculty of Science and Engineering Department of Computer Science and Engineering CSE 1520 Computer Use: Fundamentals February 6, 2008 Family Name: ________________________________________________________ Given Name: ________________________________________________________ Student Id: ________________________________________________________ Instructions 1. The exam has 12 questions and 5 pages (including this one). Examination time is 50 minutes . 2. No aids (such as calculators, reference sheets, etc.) are permitted. 3. Turn off cell phones and put your cell phones off the desk. 4. Answer each question in the space provided. If you need more space, write on the backs of pages. 5. Write legibly. Unreadable answers do not count. Do not use red ink. 6. Generally, no questions regarding the interpretation, intention, etc. of an exam question will be answered by invigilators. If in doubt, state your interpretation as part of your answer. 1. 2. 3. MARK: __________________ / 20
Background image of page 1

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

View Full DocumentRight Arrow Icon
Test 1 CSE 1520 2007-08W February 6, 2008 Page 2 of 11 Note: this a generic first test for sections M and P. It may not be exactly the one you wrote, but the questions should be very similar. 1. A number n is expressed as 653 in decimal notation. (a) What is n expressed in binary notation. ANSWER There are 2 main ways to do this. First: Find the largest power of 2 that is <= n. Say that's 2 k . Then let n1 = n – 2 k . Repeat, i.e. find the largest power of 2, say 2 x that is smaller than n1, and so on. We would have 653 = 512 (2 9 ) + 141 141 = 128 (2 7 ) + 13 13 = 8 (2 3 ) + 5 5 = 4 (2 2 ) + 1 1 = 1 (2 0 ) + 0 (so stop here) Now write it out as 1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 512 256 128 64 32 16 8 4 2 1 Second (the more general method): next page
Background image of page 2
Test 1 CSE 1520 2007-08W February 6, 2008 Page 3 of 11 Get the binary digits from right to left by repeatedly doing the following steps until the new value of n is 0 : Step 1: next digit is n mod 2 (written as “n % 2”) (i.e. the remainder when n is divided by 2). That's very easy, since the remainder will be 0 if n is an even number and 1 if n is an odd number. Step 2: let the new value of n be the old value of n divided by 2. Here, we mean “integer division”, i.e. just the whole number part of the answer/quotient is taken. We would have n n % 2 653 1 326 0 163 1 81 1 40 0 20 0 10 0 5 1 2 0 1 1 0 Remember that the column of 1 s and 0 s read top-to-bottom hold the desired binary number read right-to-left. So the answer is 1 0 1 0 0 0 1 1 0 1 Important note: We can express n in any base by this method. Just substitute that base for 2 in the above method. (b) What is n expressed in octal notation?
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 11

1)+List+3+hardcopy+devices,+explain+how+they+work,+and+discuss

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

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