public void execute()
  {
    String type = getInstructionType(IR);
    if (type.equals("H ")) { setSI(3); }
    else if (type.equals("LR"))
    {
      int op = getOperand(IR); LR(op);
      Trace.write("Operand " + Integer.toString(op) + " ");
      Trace.write("Real Address ");
      Trace.writeln(Integer.toString(refToPCB.virtualToPhysical(op)));
    }
    else if (type.equals("SR"))
    {
      int op = getOperand(IR); SR(op);
      Trace.write("Operand " + Integer.toString(op) + " ");
      Trace.write("Real Address ");
      Trace.writeln(Integer.toString(refToPCB.virtualToPhysical(op)));
    }
    else if (type.equals("CR"))
    {
      int op = getOperand(IR); CR(op);
      Trace.write("Operand " + Integer.toString(op) + " ");
      Trace.write("Real Address ");
      Trace.writeln(Integer.toString(refToPCB.virtualToPhysical(op)));
    }
    else if (type.equals("BE"))
    {
      int op = getOperand(IR); BE(op);
      Trace.write("Operand " + Integer.toString(op) + " ");
      Trace.write("Real Address ");
      Trace.writeln(Integer.toString(refToPCB.virtualToPhysical(op)));
    }
    else if (type.equals("GD"))
    {
      int op = getOperand(IR); setSI(1);
      Trace.write("Operand " + Integer.toString(op) + " ");
      Trace.write("Real Address ");
      Trace.writeln(Integer.toString(refToPCB.virtualToPhysical(op)));
    }
    else if (type.equals("PD"))
    {
      int op = getOperand(IR); setSI(2);
      Trace.write("Operand " + Integer.toString(op) + " ");
      Trace.write("Real Address ");
      Trace.writeln(Integer.toString(refToPCB.virtualToPhysical(op)));
    }
    else { setPI(1); }

    //increment all the clocks...
    if (refToPCB != null)
    {
      refToPCB.incClocks();
      refToPCB.storeRegisters(R, IR, C, IC);
    }
  } //end of execute