Modified decode() to raise an exception when an invalid instruction is encountered