# Machine Language Instructions

• csgirl504

## Homework Statement

(the language is Pep/8)

Given the following state of memory (in hexadecimal) match the problem to the solution shown:

0001 A2
0002 11
0003 00
0004 FF

What are the contents of the A register after the execution of this instruction?

C1 00 01

I know that the answer is A2 11

But I have NO idea how to get there. I tried reading the book, but none of it makes sense. My teacher gave the answer to this, but she never explained how to get it.

I know to write out C1 00 01 as

1100 0001 0000 0000 0000 0001

But I have absolutely no clue how you get A2 11 from that.

Please explain! I am so confused.

Last edited:

## Homework Statement

Given the following state of memory (in hexadecimal) match the problem to the solution shown:

0001 A2
0002 11
0003 00
0004 FF

What are the contents of the A register after the execution of this instruction?

C1 00 01

I know that the answer is A2 11
But we have no way of knowing this, since you haven't given us all the information that was presented to you.

What I see looks like it might be the contents of memory locations 1 through 4, following my a machine language instruction. I'm guessing that C1 is an op code for something, and the operands are memory locations 1 and 2.

If you want us to help you decipher this, you need to give us all of the information of this problem, otherwise we're just as lost as you are.
But I have NO idea how to get there. I tried reading the book, but none of it makes sense. My teacher gave the answer to this, but she never explained how to get it.

I know to write out C1 00 01 as

1100 0001 0000 0000 0000 0001

But I have absolutely no clue how you get A2 11 from that.

Please explain! I am so confused.

Sorry,

I forgot to say that the language is Pep/8 (virtual computer). Not sure if that tells you anything, but that is the whole problem.

I am given 5 answer choices:

a. A2 11
b. A2 12
c. 00 02
d. 11 00
e. 00 FF

And I know the answer is A. That's all the information I have. The problem comes from my textbook, at the end of a chapter on Machine Language, specifically focusing on Pep/8.

Sorry for the confusion! I think I figured it out. I'm not sure why I was having so much difficulty.

Sorry,

I forgot to say that the language is Pep/8 (virtual computer). Not sure if that tells you anything, but that is the whole problem.

I am given 5 answer choices:

a. A2 11
b. A2 12
c. 00 02
d. 11 00
e. 00 FF

And I know the answer is A. That's all the information I have. The problem comes from my textbook, at the end of a chapter on Machine Language, specifically focusing on Pep/8.
I know that you have already figured this out, but for future reference, if you have any other questions involving this language, be sure to include information about the op codes. For this problem, there must be some information in the same chapter or in the appendix, explaining what op codes such as C1 mean.