Question: Question 1 ( 1 0 points ) Convert the GCD algorithm given in this flowchart into ARM assembly using ONLY 4 instructions, where any instructions

Question 1(10 points)
Convert the GCD algorithm given in this flowchart into ARM assembly using ONLY 4 instructions, where any instructions can be conditional. The only instructions you need are CMP, B, and SUB. To facilitate the automatic marking, always convert the "Yes" branch of the flow chart before the "No" branch. AREA prog, CODE, READWRITE
ENTRY
MOV RO,\#51
MOV R1,\#34
GCD instruction-1
instruction-2
instruction-3
instruction-4
Loop B Loop
END
Test your code by assigning various values to R 0 and R 1.
What are the 4 instructions you used?
Write your answer (i.e., the 4 instructions) in TWO parts, the mnemonic in a box and ALL operands in another box.
To facilitate automatic marking,
- Use CAPITAL letters ONLY-except 0x, make it a small letter.
- Do NOT leave ANY spaces between operands.
The mnemonic of the 1st instruction is:
The operands of the 1st instruction are:
The mnemonic of the 2 nd instruction is:
The operands of the 2 nd instruction are:
The mnemonic of the 3rd instruction is:
The operands of the 3rd instruction are:
The mnemonic of the 4th instruction is:
The operands of the 4th instruction are: .
Encode the 2nd instruction to ARM machine language code.
\(0 x \)\(0 x \)0x 0x 0x \(0 x \)\(0 x \)\(0 x \) Encode the 2nd instruction to ARM machine language code.
0x___0x___0x___0x___0x___0x___0x___0x___. A
A
A
A
A
A
A
A A
A
A A A A A
A
Question 1 ( 1 0 points ) Convert the GCD

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!