Section 8.2
Review Questions

RTL for the CSC-1

  1. Write the mnemonic for the CSC-1 machine instruction whose RTL is given.
          _____________   A <- A & m[x]
          
          _____________   m[x] <- A
          
          _____________   A <- m[x]
          
          _____________   A <- x
          
          _____________   m[S] <- A
          
          _____________   PC <- S
          
          _____________   A <- A + m[x]
          
          _____________   (nothing)
          
          _____________   A <- A | m[x]
          
          _____________   A <- ~m[x]
          
          _____________   S <- A
          
          _____________   A <- S
          
          _____________   if N=0 then PC <- x
          
          _____________   A <- A >> 1
          
          _____________   A <- A << 1
          
          _____________   PC <- x
          
          _____________   if Z=1 then PC <- x
          
          _____________   if C=1 then PC <- x
          
          _____________   A <- m[S]
          
          _____________   if V=1 then PC <- x
          
          _____________   if N=1 then PC <- x
          
          _____________   (stop the computer)
          
          _____________   A <- A - m[x]
answer...
          ____AND______   A <- A & m[x]
          
          ____STD______   m[x] <- A
          
          ____LOD______   A <- m[x]
          
          ____LDI______   A <- x
          
          ____STS______   m[S] <- A
          
          ____RET______   PC <- S
          
          ____ADD______   A <- A + m[x]
          
          ____NOP______   (nothing)
          
          ____OR_______   A <- A | m[x]
          
          ____NOT______   A <- ~m[x]
          
          ____A2S______   S <- A
          
          ____S2A______   A <- S
          
          ____JP_______   if N=0 then PC <- x
          
          ____SHR______   A <- A >> 1
          
          ____SHL______   A <- A << 1
          
          ____JMP______   PC <- x
          
          ____JZ_______   if Z=1 then PC <- x
          
          ____JC_______   if C=1 then PC <- x
          
          ____LDS______   A <- m[S]
          
          ____JV_______   if V=1 then PC <- x
          
          ____JN_______   if N=1 then PC <- x
          
          ____HLT______   (stop the computer)
          
          ____SUB______   A <- A - m[x]
  1. What does the semicolon mean in the RTL for the CAL instruction?
               S <- PC; PC <- x
answer...
it separate the two RTL statements; both these statements occur at the same moment in time
  1. How many bits wide is each word of memory?
answer...
16
  1. How many bits wide are the various registers in the CSC-1?
answer...
16 except for the MAR, which is 12