Question

Assume the following register contents. X10 0x00000000AAAAAAAA, X11- 0x1234567812345678 For the register values shown above, what is the value of X12 for the following sequence of instructions? (please write short answer only in hex starting with 0x) LSL X12, X10, #4 ORR X12, X12, X11

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer is as follows :

a) LSL X12, X10, #4

The instruction perfrom the Logical Shift Left on register X10 by 4 bits and store the result to X12.

So X10 contains 0x00000000AAAAAAAA

i.e. equal to

0000 0000 0000 0000 0000 0000 0000 0000 1010 1010 1010 1010 1010 1010 1010 1010

in binary

So after performing logical shift to left by 4 bits we get :

0000 0000 0000 0000 0000 0000 0000 1010 1010 1010 1010 1010 1010 1010 1010 0000

i.e. equal to 0x0000000AAAAAAAA0 in hexadecimal

So know X12 contains 0x0000000AAAAAAAA0

b) ORR X12,X12,X11

The instruction perfrom the OR operation on data of X11 and X12 and store the result to X12.

In X12 we have :

0000 0000 0000 0000 0000 0000 0000 1010 1010 1010 1010 1010 1010 1010 1010 0000

In X11 we have : 0x1234567812345678 i.e. equal to

0001 0010 0011 0100 0101 0110 0111 1000 0001 0010 0011 0100 0101 0110 0111 1000

So after performing OR operation on these we get

0001 0010 0011 0100 0101 0100 0111 1010 1011 1010 1011 1110 1111 1110 1111 1000

i.e. equal to 0x1234567ABABEFEF8 in hexadecimal.

So finall result is 0x1234567ABABEFEF8 in X12.

if there is any query please ask in comments...

Add a comment
Know the answer?
Add Answer to:
Assume the following register contents. X10 0x00000000AAAAAAAA, X11- 0x1234567812345678 For the register values shown above, what...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT