Opcode: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
A computer can perform operations, each of which is assigned a numeric code called an '''opcode'''. Since humans are terrible at memorizing lots of similar numeric codes, [[mnemonic]]s are used as textual abbreviations. It's much easier to remember ADD than 05, for example.
 
Opcodes operate on [[register]]s, values in [[memory]], values stored on the [[Stack (computing)|stack]], iI/oO ports, the [[Computer bus|bus]], etc. They are used to perform arithmetic operations and move and change values. Operands are the things that Opcodesopcodes operate on.
 
[[Byte code]]s are another term for op codesopcodes, especially when they are used to describe higher level constructs as is the case with the [[Java programming language|Java Language]]'s JVM ([[Java Virtual Machine]]). For instance, byte code 1A might be the "iconst_2" instruction which pushes the number 2 on the stack. This is a slightly higher level of abstraction, than opcodes, which might need to load the number 2 into a register, and then push the register's value on the stack.