314s04_prelim1 - NETID_ NAME:_ SIGNATURE:_ ECE 314 Prelim...

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

View Full Document Right Arrow Icon
NETID______________________________ Page 1 of 12 NAME:_____________________________ SIGNATURE:________________________ ECE 314 Prelim Exam March 18, 2004 Normal academic integrity rules apply.
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 12 Question Possible Points Points Earned Number Representation 15 Endian Representation 20 Combinational Logic 20 State Machines & Karnaugh Maps 20 C and MIPS 25 Total 100
Background image of page 2
NETID______________________________ Page 3 of 12 Q.1. Number Representations a) (8 pts) Fill in the blanks Encoding Decimal Value Binary Pattern Hex Pattern 8-bit Sign/Magnitude 145 __________ __________ 8-bit 2’s Complement __________ 11101001 __________ 8-bit Unsigned __________ __________ AB _______________ -9 11001 __________ b) (7 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.) (-32) (98) Answer: 8-bit 2’s complement: (3 pts) Decimal: (4 pts)
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 12 Q2. Machine Endian-ness (20 pts) The following assembly code sequence is executed on two different machines, one of which is big-endian and the other of which is little-endian. The initial content of the register file is the same on both machines and shown in Table 1 . Determine the final state of both the big-endian and little-endian memory. sw $7, 0($6) sh $8, 4($6) srl $8, $8, 16 sh $8, 6($6) sb $9, 8($6) srl $9, $9, 8 sb $9, 9($6) srl $9, $9, 8 sb $9, 10($6) srl $9, $9, 8 sb $9, 11($6) sw $10, 12($6) sh $7, 14($6) a) (10 pts) Contents of the memory on the big-endian machine. 00 01 10 11 0x4000F000 0x4000F004 0x4000F008 0x4000F00C Table 2: Big-Endian Memory. Table 1: Register File
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.

Page1 / 12

314s04_prelim1 - NETID_ NAME:_ SIGNATURE:_ ECE 314 Prelim...

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