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
Click For Summary

Discussion Overview

The discussion revolves around understanding the execution of a Pep/8 instruction, specifically C1 00 01, and its effect on the A register. Participants are trying to decipher how the instruction translates to the contents of the A register given a specific state of memory.

Discussion Character

  • Homework-related
  • Exploratory

Main Points Raised

  • One participant states that the expected contents of the A register after executing the instruction are A2 11, but expresses confusion about how to arrive at that conclusion.
  • Another participant points out that without complete information about the problem, it is difficult to provide assistance, suggesting that C1 is likely an opcode and the operands refer to specific memory locations.
  • Several participants mention the need for additional context regarding the opcode C1 and its meaning within the Pep/8 instruction set.
  • One participant acknowledges their confusion but later claims to have figured out the problem, although they do not elaborate on their reasoning.

Areas of Agreement / Disagreement

Participants generally agree that the answer is A2 11, but there is no consensus on how to derive this result from the given instruction and memory state. The discussion remains unresolved regarding the specific mechanics of the instruction execution.

Contextual Notes

Participants note the importance of including information about opcodes when discussing problems related to Pep/8, indicating that understanding the instruction set is crucial for solving such problems.

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.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
Replies
9
Views
30K
Replies
5
Views
17K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K