26. Given the instruction set for MARIE in this chapter, do the following. Decipher the following MARIE machine language instructions (write the assembly language equivalent):
A. 0010000000000111 B. 1001000000001011 C. 0011000000001001 |
Expert Answer
i) 0010000000000111
A) This equalent assembly laguage code for this instruction is
Store 007
Explanation:- 0001 0000 0000 0111 is the instruction on these first 4 bits 0001 is for OP Code i.e. operational code and the next 12 bits is the data. First we have to convert this binary form to hexadecimal form, The equalent hexadecimal form for the instruction is 1 0 0 7. And now on this the first bit is OP Code or Instruction. According to the MARIE instruction set the equalent instruction for the hexadecimal bit 1 or binary bit 0001 is Store x.
So Finally the equalent machine language instruction is :Store 007
ii)1001000000001011
A) Like above the hexadecimal form for the above binary instruction is 9 0 0 B.
The MARIE instruction according to instruction set for the bit 9 or 1001 is Jump x.
So Finally the equalent machine language instruction is : Jump 00B
iii) 0011000000001001
A) The hexadecimal form for the above binary instruction is : 3 0 0 9
The MARIE instruction according to instruction set for the bit 3 or 0011 is Add x
So Finally the equalent machine language instruction is : Add 009