Machine Code from Appendix C
Op-
code Operand Description
1 RXY LOAD the register R with the bit pattern found in the
memory cell
whose address is XY.
2 RXY LOAD the register R with the bit pattern XY.
3 RXY STORE the bit pattern found in register R in the
memory cell whose
address is XY.
4 0RS MOVE the bit pattern found in register R to register
S.
5 RST ADD the bit patterns in registers S and T as though they
were two’s
complement representations and leave the result in register R.
6 RST ADD the bit patterns in registers S and T as though
they represented
values in floating-point notation and leave the floating-point
result in
register R.
7 RST OR the bit patterns in registers S and T and place the
result in register
R.
8 RST AND the bit patterns in register S and T and place
the result in register
R.
9 RST EXCLUSIVE OR the bit patterns in registers S and T
and place the
result in register R.
A R0X ROTATE the bit pattern in register R one bit to the
right X times. Each
time place the bit that
started at the low-order end at the high-order end.
B RXY JUMP to the instruction located in the memory cell
at address XY if the
bit pattern in register R is equal to the bit pattern in register
number.
Otherwise, continue with the normal sequence of execution.
(The
jump is implemented by copying XY into the program counter
during
the execute phase.)
C 000 HALT execution.
Portfolio Prompt Six - Computer Architecture and Machine
Language
1. Translate the following instructions from English into the
machine language given with this assignment (Appendix C).
a. LOAD register 6 with the hexadecimal value 77.
b. LOAD register 7 with the contents of memory cell 77.
c. JUMP to the instruction at memory location 24 if the contents
of register 0 equals
the value in register A.
d. ROTATE register 4 three bits to the right.
e. AND the contents of registers E and 2 leaving the result in
register 1.
a.
b.
c.
d.
e.
2. The following are instructions written in the machine
language given with this assignment (Appendix C). Translate
them into English.
a. 7123
b. 40E1
c. A304
d. B100
e. 2BCD
a.
b.
c.
d.
Section of main memory
Address
Contents
e.
3. Suppose the memory cells at addresses 00 through 05 in the
machine described in machine language given with this
assignment (Appendix C) contain the following bit patterns:
Address Contents
00 22
01 11
02 32
03 02
04 C0
05 00
Using the form below run the program.
CPU State
Cycle
Program Counter
Instruction Register
Decoded Instruction
1
00
2
3
4
Section of main memory
General Registers
Address
Contents
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Section of main memory
Address
Contents
Section of main memory
Address
Contents
Address
Contents
Machine Code from Appendix C Op-    code  Operand     .docx

Machine Code from Appendix C Op- code Operand .docx

  • 1.
    Machine Code fromAppendix C Op- code Operand Description 1 RXY LOAD the register R with the bit pattern found in the memory cell whose address is XY. 2 RXY LOAD the register R with the bit pattern XY. 3 RXY STORE the bit pattern found in register R in the memory cell whose address is XY. 4 0RS MOVE the bit pattern found in register R to register S. 5 RST ADD the bit patterns in registers S and T as though they were two’s complement representations and leave the result in register R. 6 RST ADD the bit patterns in registers S and T as though they represented values in floating-point notation and leave the floating-point result in register R.
  • 2.
    7 RST ORthe bit patterns in registers S and T and place the result in register R. 8 RST AND the bit patterns in register S and T and place the result in register R. 9 RST EXCLUSIVE OR the bit patterns in registers S and T and place the result in register R. A R0X ROTATE the bit pattern in register R one bit to the right X times. Each time place the bit that started at the low-order end at the high-order end. B RXY JUMP to the instruction located in the memory cell at address XY if the bit pattern in register R is equal to the bit pattern in register number. Otherwise, continue with the normal sequence of execution. (The jump is implemented by copying XY into the program counter during the execute phase.) C 000 HALT execution.
  • 3.
    Portfolio Prompt Six- Computer Architecture and Machine Language 1. Translate the following instructions from English into the machine language given with this assignment (Appendix C). a. LOAD register 6 with the hexadecimal value 77. b. LOAD register 7 with the contents of memory cell 77. c. JUMP to the instruction at memory location 24 if the contents of register 0 equals the value in register A. d. ROTATE register 4 three bits to the right. e. AND the contents of registers E and 2 leaving the result in register 1. a. b. c. d. e. 2. The following are instructions written in the machine language given with this assignment (Appendix C). Translate them into English. a. 7123 b. 40E1 c. A304 d. B100 e. 2BCD a. b. c. d. Section of main memory
  • 4.
  • 11.
    e. 3. Suppose thememory cells at addresses 00 through 05 in the machine described in machine language given with this assignment (Appendix C) contain the following bit patterns: Address Contents 00 22 01 11 02 32 03 02 04 C0 05 00 Using the form below run the program. CPU State
  • 12.
  • 13.
    Section of mainmemory General Registers Address Contents 0 1 2 3 4 5
  • 14.
    6 7 8 9 A B C D E F Section of mainmemory Address Contents
  • 22.
    Section of mainmemory Address Contents
  • 29.