Question

In: Computer Science

Suppose r0=0x0F0F0F0F and r1=0xFEDCBA98, find the result of the following operations. Note that the below instructions...

Suppose r0=0x0F0F0F0F and r1=0xFEDCBA98, find the result of the following operations. Note that the below instructions are not part of a program. Each instruction runs independently, without influencing each other.

i) EOR R4,R1,R0 ii) ORR R4,R1,R0

Solutions

Expert Solution

1)

EOR stands for Exclusive OR

In EOR if two bits are same, the result is 0

If the two bits are different, the result is 1

It is given that,

R0=0x0F0F0F0F and R1=0xFEDCBA98

EOR R4,R1,R0

This instruction performs Exclusive OR between the contents of register R0 and R1 and stores the result in register R4

Converting contents of R0 to binary

R0 = 0000 1111 0000 1111 0000 1111 0000 1111

Converting contents of R1 to binary

R1 = 1111 1110 1101 1100 1011 1010 1001 1000

The Exclusive OR between the two will give the following output

1111 0001 1101 0011 1011 0101 1001 0111

Converting back to Hex

R4 = 0xF1D3B597

2)

EOR stands for Inclusive OR

In ORR if two bits are 0, the result is 0

If the any of the two bits is 1, the result is 1

It is given that,

R0=0x0F0F0F0F and R1=0xFEDCBA98

ORR R4,R1,R0

This instruction performs Inclusive OR between the contents of register R0 and R1 and stores the result in register R4

Converting contents of R0 to binary

R0 = 0000 1111 0000 1111 0000 1111 0000 1111

Converting contents of R1 to binary

R1 = 1111 1110 1101 1100 1011 1010 1001 1000

The Inclusive OR between the two will give the following output

1111 1111 1101 1111 1011 1111 1001 1111

Converting back to Hex

R4 = 0xFFDFBF9F


Related Solutions

When r0 = 24, r1 = 36 (decimal), how many instructions will the next program fetch?...
When r0 = 24, r1 = 36 (decimal), how many instructions will the next program fetch? What is r0 when exit the loop? L1 CMP r0, r1 SUBGT r0, r0, r1 SUBLT r1, r1, r0 BNE L1
Find the constants a, b, c, d, e, r0, r1 for the ellipse r =15/(3−2cosθ) and...
Find the constants a, b, c, d, e, r0, r1 for the ellipse r =15/(3−2cosθ) and sketch the graph.
Suppose 16 coins are tossed. Find the probability of getting the following result using the binomial...
Suppose 16 coins are tossed. Find the probability of getting the following result using the binomial probability formula and the normal curve approximation. Exactly 6 heads. Binomial probability = ​(Round to 4 decimal​ places.) Normal curve approximation almost = ​(Round to 4 decimal​ places.)
. Write a sequence of instructions to calculate the following arithmetic expression and store the result...
. Write a sequence of instructions to calculate the following arithmetic expression and store the result in register CX: 20 – 6 + (-10) - (-8) + 15 Trace the contents of registers, assume initial contents are 0000 ps(there are multiple boxes) Instruction AX BX CX DX Remark initial 0000 0000 0000 0000
NOTE: Please provide instructions on how to solve it in excel add screenshots Thank you Suppose...
NOTE: Please provide instructions on how to solve it in excel add screenshots Thank you Suppose a random sample of 137 households in Chicago was taken as part of a study on annual household spending for food at home. The sample data is below. For the sample data, compute the mean and the median and construct a box and whisker plot. (Use Excel to Descriptive statistics and copy paste the screenshot here). Are the data skewed or symmetric? Approximately what...
71. Use the table below to find the probability. Positive Test Result Negative Test Result Subject...
71. Use the table below to find the probability. Positive Test Result Negative Test Result Subject Uses Drugs 44 (True Positive) 6 (False Negative) Subject is Not a Drug User 90 (False Positive) 860 (True Negative) A. If 2 of the 1000 test subjects are randomly selected, find the probability that both had false positive results. Assume that the 2 selections are made without replacement. (Round to 4 decimals) B. If 3 of the 1000 test subjects are randomly selected,...
As code is given below, follow the instructions: 1. Count the number of comparisons and find...
As code is given below, follow the instructions: 1. Count the number of comparisons and find where to put that counter in the code 2. Pick a random pivot, right pivot, left pivot, middle pivot for each smaller array /sub-array import java.util.*; import java.util.List; public class QuickSort { public static void main(String[] args) { int[] values = { 6, 5, 4, 3, 1, 7, 8 }; System.out.println("Original order: "); for (int element : values) System.out.print(element + " "); IntQuickSorter.quickSort(values); System.out.println("\nFirst...
Please complete the following code in C using the comments as instructions. Further instructions are below...
Please complete the following code in C using the comments as instructions. Further instructions are below the code. challenge.c // goal: print the environment variables to the file "env.txt", one per line // (If envp is NULL, the file should be empty, opening in write mode will do that.) // example: // inputs: // envp/environ = {"E1=2","E2=7",NULL} // outputs: // env.txt as a string would be "E1=2\nE2=7\n" // example: // inputs: // envp/environ = {NULL} or NULL // outputs: //...
Project Instructions Please read the following instructions and review the table below carefully. Then, enter answers...
Project Instructions Please read the following instructions and review the table below carefully. Then, enter answers for journal items [A] to [V] in the next item in this lesson, called Project 1 Part 1 Journal Entries for Accrual Accounting. You may keep these instructions open in a separate browser or download the instructions as a PDF, and open it as you work through the exercise. Illini Company, Inc. Balance Sheet as of 12/31/20X0 Assets Current Assets: Cash 1,500,000 Accounts receivable,...
Answer the following post with a constructive criticism The post below is with the following instructions...
Answer the following post with a constructive criticism The post below is with the following instructions of: please choose a company from the service sector, renowned for its excellent customer provision, and provide a brief overview of its sustainability and long-term profitability strategy. What is that makes its customer service unique or unbeatable? post: Ritz Carlton is one of the leading international hotels in the world, which has been admired for its exсellent customer service and continuous status of luxury...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT