Stop execution Load the operand into the A register Store the contents of the A
ID: 3701120 • Letter: S
Question
Stop execution Load the operand into the A register Store the contents of the A register into the operand Memory Value (in 1100 0001 0002 Add the operand to the A register CE Subtract the operand from the A register Character input to the operand Character output from the operand 1000 0004 0005 0006 2D 01010 01 FIGURE 64 Subset of Pep/8 instructions (a) What are the contents of the A register after the execution of this instruction? C1 00 01 b) what are the contents of the A register after the execution of this instruction? C1 00 03 (c ) What are the contents of the A register after the execution of the following two instructions? Co 00 05 70 00 05 (d) What are the contents of the A register after the execution of the following two instructions? c1 00 05 Eo 00 01 [5 Points] What are the 2 main parts of a Pep/8 machine language instruction? and (2) 5 Points] How many bits are there in a Pep/8 machine language instruction? xperience was produced by Dr. Alfred R. Watkins, Morehouse College -SpringExplanation / Answer
Solution (a)
The given instruction is C1 00 01
Now C1 is 1100 0001. the Bit shown in bold signifies that register A will be used. and the LSB is 1 we load the contents at the address 0001. Which is 1A
Thus contents of register A is 1A
Soulution(b):
Same explaination as above. Instruction given C1 00 03. So contents of A are 55
Solution(c):
The first instruciotn is C0 00 05. As the LSB in opcode C0 is 0 we will copy 0005 into register A
The second instruction is 70 00 05. As here again the LSB is 0 we consider the given number as immediate. Hence we have A = A + 0005. As A = 0005 from first instruction. Contents of A will be 000A
Solution (d):
The first instruction is C1 00 05. LSB is 1 so contents at location 0005 which are 00. Hence A = 00
Second instruction E0 00 01.
According to the given link
http://suffolk.li/cst111/19cst111/pep8.html
The opcode E0 is illegal instructions. Either your prof has given it purposefully or you better check with your prof about this.
Solution (e)
2 Main parts of PEP/8 instructions:
1. one byte instruction specifier
2. 16 bit operand.
solution(f)
Number of bits in PEP/8 language.
there are total 24 bits in an instruction.
Of which first 4 bits are opcode. In 2 nibble the first bit specifies if register A or X and the last three bits specifies immediate or memory. The remaining 16 bits are operand.
Thanks.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.