How Does Pep/8 Instruction C1 00 01 Affect the A Register?

  • Thread starter Thread starter csgirl504
  • Start date Start date
  • Tags Tags
    Language Machine
AI Thread Summary
The discussion revolves around understanding the Pep/8 instruction C1 00 01 and its effect on the A register. The user is confused about how the instruction leads to the A register containing the values A2 and 11 after execution. It is suggested that C1 is an opcode that operates on memory locations, specifically the values at those locations. The importance of providing complete information, including opcode explanations, is emphasized for better assistance. Ultimately, the user acknowledges a resolution to their confusion regarding the instruction's outcome.
csgirl504
Messages
18
Reaction score
0

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:
Physics news on Phys.org
csgirl504 said:

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.
csgirl504 said:
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.
 
csgirl504 said:
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.
 
Back
Top