sol1 - CS151B/EE116C Solutions to Homework#1 Problem(1 C.36...

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

1 CS151B/EE116C – Solutions to Homework #1 Problem (1) C.36 Problem (2) The base address of y , in hexadecimal, is 0x003A9814. lui \$9, 0x003A ori \$9, \$9, 0x9814 lw \$10, 64(\$9) sub \$10, \$10, \$15 add \$10, \$10, \$12 sw \$10, 28(\$9) Problem (3) 2.14.1 sll \$9, \$8, 10 # shift \$8 left by 10, store in \$9 srl \$9, \$9, 15 # shift \$9 right by 15 D Q D Q CLK Bit0 Bit1 Register0 D Q D Q CLK Bit0 Bit1 Register1 0 M U 1 X Bit0 Reg# 0 M U 1 X Bit1 Reg#

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

View Full Document
2 Problem (4) 515 decimal = 0x0203 In a Big Endian machine, memory contains: 24 25 26 27 02 03 00 00 We then obtain \$1 = 0x03 and \$2 = 0x00. In a Little Endian machine, memory contains: 27 26 25 24 02 03 00 00 We then obtain \$1 = 0x00 and \$2 = 0x03 Problem (5) op rs rt offset 1 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 op = 0x25 = 100101 rt = \$12 = 01100 rs = \$21 = 10101 offset = 30 = 11110

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/17/2011 for the course CS M151B taught by Professor Tamir during the Summer '11 term at UCLA.

Page1 / 7

sol1 - CS151B/EE116C Solutions to Homework#1 Problem(1 C.36...

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

View Full Document
Ask a homework question - tutors are online