ECEN 375: Computer Architecture Lab 1: Assembly: Data-Processing Procedure: The
ID: 3880444 • Letter: E
Question
ECEN 375: Computer Architecture Lab 1: Assembly: Data-Processing Procedure: The objective of this lab is to understand and demonstrate the data-processing Assembly instructions that are described in Section 6.3. Write an assembly language program that executes all of the following: Arithmetic Instructions Source registers Assembly code ADD R3. R1, R2 R3 SUB R4. RI, R2 R4 Result Logical Instructions Source registers Assembly code Result AND R3 RI, R2R3 ORR R4, R1, R2 R4 BOR R5, R1, R2 R5 BIC R6, R1, R2 R6 R7 R7.R2 Shift Instructions Source register Result Assembly Code LSL R0, RS, #7 RO LSR R1, RS, #17R1 ASR R2, R5, #3 R2 ROR R3, R5. #21R3Explanation / Answer
Arithmatic :-
Given :-
R1 = 0100 0110 1010 0001 1111 0001 1011 0111
R2 = 1111 1111 1111 1111 0000 0000 0000 0000
ADD R3,R1,R2
R3 = 0100 0110 1010 0000 1111 0001 1011 0111
SUB R4,R1,R2
R4 = 1011 1001 0101 1110 1111 0001 1011 0111
LOGICAL :-
Given :-
R1 = 0100 0110 1010 0001 1111 0001 1011 0111
R2 = 1111 1111 1111 1111 0000 0000 0000 0000
AND R3,R1,R2
R3 = 0100 0110 1010 0001 0000 0000 000 0000
ORR R4,R1,R2
R4 = 1111 1111 1111 1111 1111 0001 1011 0111
EOR R5,R1,R2
R5 = 1011 1001 0101 1110 1111 0001 1011 0111
MVN R7,R2
R7 = 0000 0000 0000 0000 1111 1111 1111 1111
Shift :-
Given :-
R5 = 1111 1111 0001 1100 0001 0000 1110 0111
LSL R0,R5,#7
R0 = 1000 1110 0000 1000 0111 0011 1000 0000
LSR R1,R5,#17
R1 = 0000 0000 0000 0000 0111 1111 1000 1110
ASR R2,R5,#3
R2 = 1111 1111 1110 0011 1000 0010 0001 1100
ROR R3,R5,#21
R3 = 1110 0000 1000 0111 0011 1111 1111 1000
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.