And if you disassemble this, it's the opcode for jump to address 0.
如果你反汇编它,它就是跳转到地址 0 的操作码。
科技 Crash Course
In this case the opcode, which is the first four bits, is: 0010.
在这种情况下,操作码(前四位)是:0010。
科技 Crash Course
This opcode corresponds to the " LOAD A" instruction, which loads a value from RAM into Register A.
该操作码对应于“LOAD A”指令,该指令将一个值从 RAM 加载到寄存器 A。
科技 Crash Course
That opcode 1000 is an ADD instruction.
该操作码 1000 是一条 ADD 指令。
Crash Course 综合篇
In our hypothetical example, we use the first four bits to store the “operation code”, or opcode for short.
在我们假设的例子中, 我们使用前四位来存储“操作码”,或简称操作码。
科技 Crash Course
For example, imagine a CPU that uses 8 bit opcodes.
例如,想象一个使用 8 位操作码的 CPU。
科技 Crash Course
For example, there's over a dozens different opcodes just for variants of ADD!
例如,仅针对 ADD 的变体,就有数十种不同的操作码!
科技 Crash Course
But there is no instruction with an opcode of 0, and so the computer would have crashed!
但是没有操作码为 0 的指令,所以计算机会崩溃!
科技 Crash Course
So, our hypothetical CPU is very basic – all of its instructions are 8 bits long, with the opcode occupying only the first four bits.
所以,我们假设的 CPU 是非常基本的——它的所有指令都是 8 位长,操作码只占据前四位。
英语百科
Opcode
In computing, an opcode (abbreviated from operation code) is the portion of a machine language instruction that specifies the operation to be performed. Beside the opcode itself, instructions usually specify the data they will process, in form of operands. In addition to opcodes used in instruction set architectures of various CPUs, which are hardware devices, they can also be used in abstract computing machines as part of their byte code specifications.