DOC PREVIEW
UW-Madison CS/ECE 252 - Examination

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 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 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 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 TAs Marc de Kruijf & Sanghamitra Roy Midterm Examination 1 In Class (50 minutes) Wednesday, February 14, 2006 Weight: 15% CLOSED BOOK, NOTE, CALCULATOR, PHONE, & COMPUTER. The exam in two-sided and has six pages, including two blank pages at the end. Plan your time carefully, since some problems are longer than others. NAME: __________________________________________________________ ID# ______________________________________________________________ Problem Number Maximum Points Actual Points 1 4 2 3 3 3 4 4 5 4 6 4 7 4 8 4 Total 302 Problem 1 (4 points) (a) What is the largest (most positive) integer that can be represented as an unsigned integer using 10 bits? (b) What is the largest (most positive) integer that can be represented as a two’s complement integer using 10 bits? Problem 2 (3 points) Consider bitwise logical operations: (a) Compute 0011 AND 1001 (b) Compute 0011 OR 1001 (c) Compute NOT 1001 Problem 3 (3 points) Convert the number -33 (base ten) into two's complement representation with 8 bits.3 Problem 4 (4 points) Consider the 8-bit binary bit pattern 11010111. What is its decimal (base ten) value if the bit pattern is interpreted as: (a) An unsigned integer? (b) A two’s complement integer? Problem 5 (4 points) (a) Add the following 5-bit two's complement binary numbers: 01110 + 10110. 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: 11101 + 11111. Express your answer in 5-bit two's complement. Please indicate if there was an overflow.4 Problem 6 (4 points) (a) Convert the hexadecimal number (base sixteen) number 6A1F into binary (b) Convert the binary number 10011101 into a hexadecimal number (base sixteen) Problem 7 (4 points) (a) Why do most computers represent numbers in binary (base two) rather than decimal (base ten)? (b) What is the name given to the hardware/software interface? Problem 8 (4 points) (a) Given an example of a number that can be represented in 32-bit IEEE 754 floating-point, but cannot be represented as a 32-bit two-complement integer. Explain why. (b) Computer C1 has an instruction for addition but no instruction for multiplication. Computer C2 has instructions for both addition and multiplication. Can computer C2 solve more problems than computer C1? Why or why not?5 Scratch Sheet 1 (in case you need additional space for some of your answers)6 Scratch Sheet 2 (in case you need additional space for some of your


View Full Document
Download Examination
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 Examination 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 Examination 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?