DOC PREVIEW
UW-Madison CS/ECE 252 - CS/ECE 252 Midterm Examination 1

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1 CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING COMPUTER SCIENCES DEPARTMENT UNIVERSITY OF WISCONSIN—MADISON Prof. Mark D. Hill & Prof. Mikko Lipasti TAs Sanghamitra Roy, Eric Hill, Samuel Javner, Natalie Enright Jerger, & Guoliang Jin Midterm Examination 1 In Class (50 minutes) Monday, October 1, 2007 Weight: 15% CLOSED BOOK, NOTE, CALCULATOR, PHONE, & COMPUTER. The exam has four two-sided pages. Plan your time carefully, since some problems are longer than others. NAME: __________________________________________________________ SECTION: __________________________________________________________ ID# ______________________________________________________________2 Problem Number Maximum Points Actual Points 1 4 2 3 3 3 4 4 5 4 6 4 7 4 8 4 Total 303 Problem 1 (4 points) a) What is the largest (most positive) integer that can be represented as an unsigned integer using 13 bits? b) What is the largest (most positive) integer that can be represented as a two’s complement integer using 13 bits? Problem 2 (3 points) Consider bitwise logical operations: Compute (1101 AND 0111) OR (NOT 0011)4 Problem 3 (3 points) Convert the number -84 (base ten) into two's complement representation with 8 bits. Problem 4 (4 points) Consider the 8-bit binary bit pattern 10010010. What is its decimal (base ten) value if the bit pattern is interpreted as: (a) An unsigned integer? (b) A two’s complement integer?5 Problem 5 (4 points) (a) Add the following 5-bit two's complement binary numbers: 01111 + 01101. Express your answer in 5-bit two's complement. Please indicate if there was an overflow. (b) Add the following 5-bit two's complement binary numbers: 11110 + 01111. Express your answer in 5-bit two's complement. Please indicate if there was an overflow. Problem 6 (4 points) (a) Convert the ASCII string “F4n” into binary. (See attached ASCII table. Only convert the characters between the quotation marks.) (b) Convert the binary value 0010010001101011 into an ASCII string.6 Problem 7 (4 points) (a) What is the base ten (decimal) value represented by binary 110.101 ? (b) The bits for an IEEE floating point number are allocated as follows: sign(1bit) exponent(8bits) fraction(23bits) where N = (-1)S x 1.fraction x 2exponent-127 Convert 1 10000001 11000000000000000000000 to decimal. Problem 8 – Circle the correct answer (2 points each) I. Which of the following is a universal computing device? a. A 16-button(0-9, period, =/+/-/x/÷) calculator b. A laptop computer running Windows XP c. An ultrafast supercomputer d. All of the above e. Both (b) and (c) II. When referring to an algorithm, definiteness means: a. Each step must be precisely defined b. The algorithm’s variables must not overflow a fixed number of bits c. The number of unknowns and equations is the same d. None of the above7 ASCII Table CharacterHex CharacterHex CharacterHex CharacterHexnul 00 sp 20 @ 40 ` 60soh 01 ! 21 A 41 a 61stx 02 ʺ 22 B 42 b 62etx 03 # 23 C 43 c 63eot 04 $ 24 D 44 d 64enq 05 % 25 E 45 e 65ack 06 & 26 F 46 f 66bel 07 ʹ 27 G 47 g 67bs 08 ( 28 H 48 h 68ht 09 ) 29 I 49 i 69lf 0A * 2A J 4A j 6Avt 0B + 2B K 4B k 6Bff 0C , 2C L 4C l 6Ccr 0D ‐ 2D M 4D m 6Dso 0E . 2E N 4E n 6Esi 0F / 2F O 4F o 6Fdle 10 0 30 P  50 p 70dc1 11 1 31 Q 51 q 71dc2 12 2 32 R 52 r 72 dc3 13 3 33 S 53 s 73dc4 14 4 34 T 54 t 74nak 15 5 35 U 55 u 75syn 16 6 36 V 56 v 76etb 17 7 37 W 57 w 77can 18 8 38 X 58 x 78em 19 9 39 Y 59 y 79sub 1A : 3A Z 5A z 7Aesc 1B ; 3B [ 5B { 7Bfs 1C < 3C \ 5C | 7Cgs 1D = 3D ] 5D } 7Drs 1E > 3E ^ 5E ~ 7Eus 1F ? 3F _ 5F del 7F8 Scratch Sheet (in case you need additional space for some of your


View Full Document
Download CS/ECE 252 Midterm Examination 1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CS/ECE 252 Midterm Examination 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS/ECE 252 Midterm Examination 1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?