Section 7.2
Review Questions

Instructions of the CSC-1

  1. How many instructions are there in the CSC-1?
  1. What is the smallest number of bits you need to encode all these? (HINT: Take the ceiling of the logarithm base 2 of the above number.)
  1. Write out the format of the LDI instruction.
  1. If the top 4 bits of an instruction are all 1's, what do we automatically know about the bottom 8 bits?
  1. There are 15 instructions whose opcode is 4 bits long. Why can't we also have a 16th instruction, whose opcode is 1111?
  1. In the blank to the left of each instruction below, write its mnemonic.
               __________ No Operation (waste cycle)
               
               __________ Subtract memory word xx...from A
               
               __________ Add memory word xx... to A
               
               __________ Load memory word xx... into A
               
               __________ Jump to address xx... if V=1
               
               __________ Boolean bitwise AND of memory with A
               
               __________ Halt the computer
               
               __________ Return from subroutine
               
               __________ Boolean bitwise OR of memory with A
               
               __________ Store A via S (indirect store)
               
               __________ Load constant kk... into A
               
               __________ Boolean bitwise NOT of memory
               
               __________ Jump to address xx... if C=1
               
               __________ Call subroutine xx...
               
               __________ Jump to address xx... if N=1
               
               __________ Copy A into S
               
               __________ Jump to address xx... if Z=1
               
               __________ Copy S into A
               
               __________ Shift Left 1 bit (logical shift)
               
               __________ Jump to address xx... if N=0 and Z=0
               
               __________ Shift Right 1 bit (logical shift)
               
               __________ Load A via S (indirect load)
               
               __________ Store A into memory xx...
               
               __________ Jump to address xx... unconditionally