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 1 4 2 3 4 5 6 3 3 4 4 4 7 4 8 4 Total 30 Actual Points 1 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 2 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 3 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 4 Scratch Sheet 1 in case you need additional space for some of your answers 5 Scratch Sheet 2 in case you need additional space for some of your answers 6
View Full Document