ANSWERS |LATEST VERSION |ALREADY GRADED A+
1. One of MARIE's a 16 bit register that holds a conditional operator
7 registers: (e.g. "less than") or one operand of a two-operand instruction
Accumu-lator
(AC)
By using register transfer language (RTL)
2. How can the -In the MARIE RTL we use the notation M[X] to indicate the actual
exact sequence data value stored in memory location X, and <- to indicate the transfer of
of mi- bytes to a register or memory location
crooperations
that are carried
out by an
instruction be MAR <- X
specified? MBR <-
M[MAR] AC <-
3. The RTL for MBR
the LOAD
instruction is: MAR <- X
MBR <-
4. The RTL for the M[MAR] AC <-
ADD instruction AC+MBR
is:
If IR[11-10] = 00 then
-- - -f AC < 0 then PC <- PC + 1
5. Recall that
SKIP-COND
skips the
next instruction ac- else if IR[11-10] = 01 then
cording to the complex in our instruction set
val-ue of the
AC 6. 3 Indirect Address-ing Mode Instruc-tions in
-The RTL for the MARIE Instruction Set
this instruction
is the most
1/
31
, COSC 290 FINAL EXAM WITH ALL CORRECT & 100% VERIFIED
ANSWERS |LATEST VERSION |ALREADY GRADED A+
-- - -f AC = 0 then PC <- PC +
1
else if IR[11-10] = 11 then
-----if AC > 0 then PC <- PC +
1
LOADI X, STOREI X, ADDI X
2/
31
, COSC 290 FINAL EXAM WITH ALL CORRECT & 100% VERIFIED
ANSWERS |LATEST VERSION |ALREADY GRADED A+
7. LOADI X in RTL MAR <- X
(in-
MBR <-
direct
M[MAR] MAR
addressing
<- MBR MBR
mode)
<- M[MAR]
AC <- MBR
8. STOREI X in RTL (in- MAR <- X
direct addressing MBR <- M[MAR]
mode) MAR <-
MBR MBR
<- AC
M[MAR] <-
9. The ADDI MBR
instruc-tion is a
combina-tion of MAR <- X
LOADI X & ADD MBR <- M[MAR]
X (indirect ad- MAR <-MBR
dressing mode) MBR <-
M[MAR] AC <-
ADDI X in RTL: AC + MBR
10. The
Jump-and-Store
instruction, JNS,
MBR <- PC
gives us limited MAR <-
subroutine X
functionality M[MAR] <- MBR
MBR <-X
JNS in RTL: <- 1
AC <- AC + MBR AC
<- PC
3/
31
, COSC 290 FINAL EXAM WITH ALL CORRECT & 100% VERIFIED
ANSWERS |LATEST VERSION |ALREADY GRADED A+
11. CLEAR in RTL: AC <- 0
-all it does is set the contents of the accumulator to all zeroes
12.
4/
31