Computer Science: An Overview: Global Edition (12th Edition)

Published by Pearson Higher Education
ISBN 10: 1292061162
ISBN 13: 978-1-29206-116-0

Chapter 2 - Data Manipulation - Section 2.4 - Arithmetic/Logic Instructions - Questions & Exercises - Page 115: 12

Answer

$One\ solution\ is\ as\ follows:$ $15E0 \rightarrow$ (LOAD register 5 with the contents of memory cell E0.) $A502 \rightarrow$ (ROTATE the contents of register 5 to the left by 2 bits.) $260F \rightarrow$ (LOAD register 6 with the value 0F.) $8056 \rightarrow$ (AND registers 5 and 6, leaving the result in register 0.) $30E1 \rightarrow$ (STORE the contents of register 0 in memory cell E1.) $C000 \rightarrow$ (HALT.)

Work Step by Step

$One\ solution\ is\ as\ follows:$ $15E0 \rightarrow$ (LOAD register 5 with the contents of memory cell E0.) $A502 \rightarrow$ (ROTATE the contents of register 5 to the left by 2 bits.) $260F \rightarrow$ (LOAD register 6 with the value 0F.) $8056 \rightarrow$ (AND registers 5 and 6, leaving the result in register 0.) $30E1 \rightarrow$ (STORE the contents of register 0 in memory cell E1.) $C000 \rightarrow$ (HALT.)
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.