derive opcode form a primative