Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Please write an assembly program to do following operations: (a) Put the bit pattern 0x35353535 in register $8 (use ONLY $8 and THREE instructions.

1. Please write an assembly program to do following operations:

(a) Put the bit pattern 0x35353535 in register $8 (use ONLY $8 and THREE instructions. Note that 0x35353535 is more than 16 bits and CANNOT be used as an immediate operand directly).

(b) $9 gets the bits in $8 shifted left logical by one position (leave $8 unchanged).

(c) $10 gets the bit-wise OR between $8 and $9.

(d) $11 gets the bit-wise AND between $8 and $9.

(e) $12 gets the bit-wise XOR between $8 and $9.

(f) Reflect each bit of the pattern in $12 and put the result into register $13

(g) Move the bit pattern in register $13 to register $14

2. Please write an assembly program to do following operations:

(a) Put the bit pattern 0x0000FACE into register $8.

(b) Use ONLY register-to register logic and shift instructions (Do NOT use immediate operands, e.g., Do not use ori instruction) to rearrange the bit pattern in $8 so that $9 gets the bit pattern 0x0000CAFE. You can use other registers to save intermediate results.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

What are your options besides a rote memory approach?

Answered: 1 week ago