Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello, I specifically need help with part 3. I do not know how to find (column 4

ID: 1766230 • Letter: H

Question

Hello, I specifically need help with part 3. I do not know how to find (column 4) the number of memory locations occupied by the instruction and also (column 5) the size of the instruction. Please explain clearly. Thank You.

Question Three (10 points) The figure below shows a screenshot of an assembly program being executed by Keil simulator. Answer the following questions: Core 11, #0x0A r2, r1,r0,LSL rS, r1,r0 r4, ri,r0 RD x7F000000 82 x0000041A EA510280 ORR3 0X00000422 180C 0x00000428 000041E FB01E300 NUL Ox00000100 R4 R5 tartup ARMCNB. R9 AREA iqita, CCDE, READONLY R10 R11 R12 R13 (5P) 20001068 R14LR D00153 R15(PD000041E Morro, #0x7 FOOOOOO ORRS r2, r1, ro, LSL #2 10 main 12 13 1. What is the next instruction that will be executed? Why? Next Instruction is MUL r3m rl, r0. This is because the content of the program counter PC is 0x0000041E 2. What is the current content of the NZCV flags? Why N-1, because the most significant bit equals to 1 Z-0, the result is not zero C-1, logic instruction with logical shift V-0, logic instructions do not update the V flag. 3. Fill the table below Instruction Machine Code Memory ad dressNumber of Size of instruction memor locations(16 bit or 32 occupied by the Instructiorn MOV r0, #0x7F000000 MOVS r1, #10 ORRS r2, r1, r0, LSL #2 bit) 32 16 32 | 0xFO4F40FE 01210A 0|EA510280 0x00000414 0x 0x0000041A 418 |

Explanation / Answer

Column 4 (Number of memory locations occupied by the instruction) & Column 5 (Size of instruction) depends on the Machine code mentioned in Column 2.

Machine code represented in hexadecimal format is what a processor understands and performs the task accordingly.

Each digit in machine code is called nibble and equivalent to 4 bits.

Each memory address corresponds to a location of generally byte size. Hence each memory location address corresponds to 2 nibbles of machine code.

For example: MOV r0, #0x7F000000 have Machine Code 0xF04F40FE which is 8 digit hex.

2 digit hex is 1 byte stored in one memory address. So total 4 bytes represents the machine code of the instruction.

Each byte occupies one memory location hence 4 location used for 4 bytes.

4 byte Machine code (8 digit hex) = 4x8 =32 bits

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote