Compute the Boolean bitwise expression (A AND B) OR C for:
A = 1101 0000 1010 0011
B = 1111 1111 0000 1111
C = 0000 0000 0010 0000
AND and OR must be performed in a bitwise manner.
Devise a way to interchange two variables A and B without using a third variable or register. Hint: Think about the EXCLUSIVE OR instruction.
On a certain computer it is possible to move a number from one register to another, shift each of them left by different amounts, and add the results in less time than a multiplication takes. Under what condition is this instruction sequence useful for computing "constant * variable"?
For the previous question (textbook problem 5.27), would that instruction sequence be equally useful for computing "variable * variable"? Justify your answer.
.globl _start
_start:
mov r1, #15
mov r2, #20
@@@ Place your code here.
.globl _start
_start:
mov r1, #17
@@@ Place your code here.
Back to the list of assignments.