314s04_prelim1

# 314s04_prelim1 - NETID NAME SIGNATURE ECE 314 Prelim Exam...

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

NETID______________________________ Page 1 of 12 NAME:_____________________________ SIGNATURE:________________________ ECE 314 Prelim Exam March 18, 2004 Normal academic integrity rules apply.

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

View Full Document
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
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)

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

View Full Document
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
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.

### Page1 / 12

314s04_prelim1 - NETID NAME SIGNATURE ECE 314 Prelim Exam...

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

View Full Document
Ask a homework question - tutors are online