Winter 2008 Midterm

Report 7 Downloads 187 Views
Name:______________________________

Student ID:________________

McGill University Department of Electrical and Computer Engineering ECSE 221 Introduction to Computer Engineering I Mid Term Exam Examiner: F.P. Ferrie

Date: February 15, 2008

Unless otherwise indicated, answer all questions in the workbook provided. Closed book examination, calculators permitted (Faculty Standard only). Question 1 Encode the decimal number -4.2 x 1015 using IEEE 754 as an 8 digit hexadecimal number. Compute the mantissa to equivalent precision. Question 2 Decode the following IEEE 754 encoded number: 0xc37f0000. Question 3 What is produced by the following snippet of “C” code? #include <stdio.h> int main() { int a, *b; a=42; b=&a; printf(" The output is %0x\n",*b); }

Question 4 Suppose the printf statement in Question 3 was modified to read printf(" The output is %0c\n",*b+23|32);

What is produced by the modified snippet of “C” code? Question 5 A laptop display has screen dimensions of 1440x900 pixels and can represent a maximim of 16 million colors. How much space (# bytes) is required to represent this display in computer memory?

Page 1 of 2

Name:______________________________

Student ID:________________

Question 6 Determine the minimal canonical forms (∑π, π∑) corresponding to the following sum of products form: X = " {0,2,3,8,11} + d{5,10} . Terms 5 and 10 correspond to don’t A ,B ,C ,D

care inputs. Question 7 Prove ! that the ∑π and π∑ forms you obtained in Question 6 are equivalent. Question 8 Implement the function in Question 6 with an 8-input multiplexer. Question 9 Write down the NAND-NAND implementation for the minimal ∑π form you obtained in Question 6. Will this circuit produce glitches? Explain why in 1 sentence. How could you modify the circuit to produce glitch-free output assuming i) that you could not modify gate delays, and ii) not increase the propagation delay of the circuit. Question 10 Write down the state transition table for a J-K flip-flop. Question 11 The circuit shown at right is driven by the inputs shown below in the corresponding timing diagram. Fill in the circuit outputs, Q and Q’ directly on the question sheet. Remember to hand in the question sheet with your exam booklet.

Page 2 of 2