prelim1_sp06sol - NETID_ NAME:_Answer Key_ SIGNATURE:_ ECE...

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

View Full Document Right Arrow Icon
NETID______________________________ Page 1 of 11 NAME:_____ Answer Key ______________ SIGNATURE:________________________ ECE 314 Prelim Exam March 16, 2006 Normal academic integrity rules apply. No calculators. Show your work (e.g., on the back of the page) in order to receive partial credit.
Background image of page 1

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

View Full DocumentRight Arrow Icon
NETID______________________________ Page 2 of 11 Question Possible Points Points Earned Number Representation 20 Endian Representation 20 Digital Logic 20 Performance 20 C and MIPS 20 Total 100
Background image of page 2
NETID______________________________ Page 3 of 11 Q.1. Number Representation (15 pts) a) (8 pts) Fill in the blanks: Encoding Decimal Value Binary Pattern Hex Pattern 8-bit Sign/Magnitude -72 __110001000__ ___D8_____ 8-bit 2’s Complement ____-55______ 11001001 ___C9_______ 8-bit Unsigned ___205____ _11001001_ 0xCD _5-bit Sign/Magnitude -11 11011 ____1B___ i) -72: = -(64+8) = -(2 6 + 2 3 ) = 0b11001000 = 0xD8 ii) 0b11001001 = 0xC9 = -128 + 64 + 8 + 1 = -128 + 73 = -55 iii) 0xCD = 0b11001101 = 2 7 + 2 6 +2 3 +2 2 +2 0 = 128 + 64 + 8 + 4 + 1 = 205 iv) -11 = 0b11011 = 0x1B = -11 (5-bit sign magnitude) b) (6 pts) Perform the following calculation in 8-bit 2’s complement. First convert the numbers from decimal to binary representation, and then perform the computation. Report your answer in both binary 8-bit 2’s complement and decimal representations. There will be no partial credit for this problem. (Hint: doing the addition in decimal will NOT work correctly.) (-44) (87) -44 = -(32+8+4) = -(00101100) = 11010011 + 1 = 11010100 -87 = -(64+16+4+2+1) = -(01010111) = 10101000 + 1 = 10101001 11010100 + 10101001 01111101 = 64 + 32 + 16 + 8 + 4 + 1 = 125 Answer: 8-bit 2’s complement: (3 pts) 01111101
Background image of page 3

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

View Full DocumentRight Arrow Icon
Page 4 of 11 c) (3 pts) Convert the decimal number 1.5 into IEEE Floating Point Standard format. Write your answer in the space below. 3130 2928 2726 2524 2322 2120 1918 1716 1514 1312 1110 9 8 7 6 5 4 3 2 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3FC0 0000 1.5 = (1.1) 2 = 1.1*2 0 = 1.1*2 127-127 Extra Credit (2 pts): What is the representation of 63 in 8-bit base -2? -2
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/05/2008 for the course ECE 314 taught by Professor Mckee/long during the Spring '08 term at Cornell University (Engineering School).

Page1 / 11

prelim1_sp06sol - NETID_ NAME:_Answer Key_ SIGNATURE:_ ECE...

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

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