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

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

View Full Document Right Arrow Icon
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#
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

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

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

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