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

Problem 4: Easy-to-follow Assembly Instructions The conversion of a mnemonic ins

ID: 3746353 • Letter: P

Question

Problem 4: Easy-to-follow Assembly Instructions The conversion of a mnemonic instruction to its binary representation is called assembly. This tedious process is generally delegated to a computer program for a variety of reasons. The first is that it alleviates the need to keep track of all the various bit encodings for each type of instruction. A second reason is that frequently the precise encoding of an instruction cannot be determined in a single pass This is particularly true when referencing labels. In the following exercises, you will get a taste of what the task of translating from assembly to machine language is like. Give binary and hexadecimal encodings for the following instructions: Hex Binary A. B. C. D. E. F. EOR R4, R3, R11 AND R10, R9, R7 ADC R1, R0, #599785472 MOV R9, R10 MVN R3, #6144 ORR R9, R2, #171

Explanation / Answer

Hex Binary Instruction 0xE2234300 1110 00 1 0001 0 0011 0100 0011 0000 0000 EOR R4, R3, R11 0xE209A700 1110 00 1 0000 0 1001 1010 0111 0000 0000 AND R10, R9, R7 0xE2A01B8F 1110 00 1 0101 0 0000 0001 1011 1000 1111 ADC R1, R0, #599785472 0xE3A9A000 1110 00 1 1101 0 1001 1010 0000 0000 0000 MOV R9, R10 0xE3E30418 1110 00 1 1111 0 0011 0000 0100 0001 1000 MVN R3, #6144 0xE38920AB 1110 00 1 1100 0 1001 0010 0000 1010 1011 ORR R9, R2, #171