private void executeOneInst(){
                
        String opcodeCondition = new String();
       
    	if (controlPanel.runType!=5){
        IR.set(MEMORY.get(PC.get()));
         opcodeCondition = IR.get().substring(0, 6);
         
        }
        else {
            IR.set(strSwitches);
            opcodeCondition = strSwitches.substring(0, 6);
        }
        strSwitches=IR.get();
            
          if (opcodeCondition.equals("010100") || opcodeCondition.equals("010101")
                  || opcodeCondition.equals("010110") || opcodeCondition.equals("010111")
                  || opcodeCondition.equals("011000") || opcodeCondition.equals("011001")) {
              DecodeArithRtoR();
          } else if (opcodeCondition.equals("011111")|| opcodeCondition.equals("100000")) {
              DecodeLogicalInstruct();
          } else if (opcodeCondition.equals("111101")|| opcodeCondition.equals("111110") || opcodeCondition.equals("111111")) {
              DecodeIOInstruct();
          } 
          else {
              Decode();
          }
         controlPanel.getLblOpcode().setText(OPCODE.get());
        
         switch (Integer.parseInt(OPCODE.get(),2)) {
              case 0:
                 AppendInstructionAsText("HLT");
                 HLT();
                 break;
              case 1:
                 AppendInstructionAsText("LDR");
                 LDR();
                 break;
              case 2 :
                AppendInstructionAsText("STR");
                STR();
                break;
              case 3:
                AppendInstructionAsText("LDA");
                LDA();
                break;
              case 4:
                AppendInstructionAsText("AMR");
                AMR();
                break;    
              case 5:
                 AppendInstructionAsText("SMR");
                 SMR();                
                 break;  
              case 6:
                  AppendInstructionAsText("AIR");
                  AIR();                                 
                 break;  
              case 7:
                   AppendInstructionAsText("SIR");
                   SIR();
                   break; 
              case 8:
                   AppendInstructionAsText("AIX");
                   AIX();
                   break; 
               case 9:
                   AppendInstructionAsText("SIX");
                   SIX();
                   break; 
              case 10:
                   AppendInstructionAsText("JZ");
                   JZ();
                   
                  break; 
              case 11:
                   AppendInstructionAsText("JNE");
                   JNE();
                  break; 
              case 12:
                   AppendInstructionAsText("JCC");
                   JCC();
                  break; 
              case 13:
                  AppendInstructionAsText("JMP");
                   JMP();
                   break;
              case 14:
                   AppendInstructionAsText("JSR");
                   JSR();
                   break;
              case 15:
                   AppendInstructionAsText("RFS");
                   RFS();
                   break;
              case 16:
                   AppendInstructionAsText("SOB");
                   SOB();
                   break;
              case 17:
                   AppendInstructionAsText("JGE");
                   JGE();
                   break;
               case 20:
                   AppendInstructionAsText("MLT");
                   MLT();
                   break;
              case 21:
                   AppendInstructionAsText("DVD");
                   DVD();
                  break;
              case 22:
                   AppendInstructionAsText("TRR");
                   TRR();
                  break;
              case 23:
                  AppendInstructionAsText("AND");
                   AND();
                  break;
              case 24:
                   AppendInstructionAsText("ORR");
                   ORR();
                  break;
              case 25:
                   AppendInstructionAsText("NOT");
                   NOT();
                  break;
              case 30:
                   AppendInstructionAsText("TRAP");

              case 31:
                   AppendInstructionAsText("SRC");
                   SRC();
                  break;
              case 32:
                  AppendInstructionAsText("RRC");
                   RRC();
                  break;
              //--------------------------------------------------------------------------------       
            // Floating Points and Vecter Instruction
                  case 33:
                      AppendInstructionAsText("FADD");
                      FADD();
                      break;
                  case 34:
                      AppendInstructionAsText("FSUB");
                      FSUB();
                      break;
                  case 35:
                      AppendInstructionAsText("VADD");
                      VADD();
                      break;
                  case 36:
                      AppendInstructionAsText("VSUB");
                      VSUB();
                      break;
                  case 37:
                      AppendInstructionAsText("CNVRT");
                      CNVRT();
                      break;
                  case 50:
                      AppendInstructionAsText("LDFR");
                      LDFR();
                      break;
                  case 51:
                      AppendInstructionAsText("STFR");
                      STFR();
                      break;
           //--------------------------------------------------------------------------------------------      
              case 41:
                  AppendInstructionAsText("LDX");
                   LDX();
                   break;
              case 42: 
                  AppendInstructionAsText("STX");
                  STX();
                  break;
              case 61: 
                  AppendInstructionAsText("IN");
                  IN();
                  break;
              case 62: 
                 AppendInstructionAsText("OUT");
                 OUT();
                 break;
              case 63: 
                  AppendInstructionAsText("CHK");
                  CHK();
                  break;
              default:
                   break;
          }  
         
         ControlPanel.lblPC.setText(String.format("%s", Integer.parseInt(PC.get(),2)));
        
         
    }