Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

16. Suppose Mask-0x00000FeF and P0xABCDABCD. What are the results of the following bitwise operations? Consider each one separately and independently operating on its operands. (1)

image text in transcribed

16. Suppose Mask-0x00000FeF and P0xABCDABCD. What are the results of the following bitwise operations? Consider each one separately and independently operating on its operands. (1) Q P & Mask; (2) Q = P I Mask; (3) Q: P ^ Mask; (4) Q= ~Mask; (5) Q= P & ~Mask; 17. Suppose re-0XFFFFFFFF, r1 0x80000001, and r2 0x00000000. Initially N, Z, C, and V flags are zero. Find the value of the N, Z, C, and V flags upon executing the following instructions. (Assume each instruction runs individually, i.e. these instructions are not part of a program.) Do NOT use the debugger as you are expected to reason and conclude values for the flags. (1) ADD r3, re, r2 (2) SUBS r3, re, re (3) ADDS r3, re, r2 (4) LSL r3, re, #1 (5) LSRS r3, r1, #1 (6) ANDS r3, re, r2 18. Suppose we have a hypothetical processor, of which each register has only five bits. re - 0b11101 and ri -eb10110. What are the N, Z, C, V flags upon executing the following instructions? Assume initially N-0, Z-0, C-1, V-0, and these instructions are executed independently (i.e. they are NOT part of a program). Do NOT use the debugger! You must determine the flag values through reasoning (1) ADDS r3, re, rl (2) SUBS r3, re, rl (3) EOR r3, re, r1 (4) ANDS r3, r1, r1, LSL #3

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

Step: 3

blur-text-image

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago