Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
6 user(s) are online (6 user(s) are browsing encyclopedia)

Members: 0
Guests: 6

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Opcode

Opcode stands for Operation Code. Opcodes operate on processor register, values in memory, values stored on the Stack (computing), I/O ports, the Computer bus, etc. They are used to perform arithmetic operations and move and change values. Operands are the things that opcodes operate on. Microprocessors perform operations using binary bits. A Bit is either on (1) or off (0). Eight bits is equal to a byte (on most modern processors), and two bytes is equal to a word.

Another term for opcodes is Byte code. Byte code is used especially to describe higher level constructs as is the case with the Java programming 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.

As an example let s design a crude 4-bit microprocessor. *First: All registers, ALUs, counters, and addresses must have a data path of 4-bits. *Second: All of our instructions must fit in a 3-bit address. Below is a diagram of the opcodes of the micorprocessor: op-codes mnemonic operations explanation 000 ADD add A to B and store in b 001 mov move A to B and store in b 010 Jmp jump value in A 011 xorA xor A with next op-code store in b 100 clrA clear A 101 return return to pointer 110 counter counter value 111 end end program

When the op-code values are active at the decoders logic inputs, the desired operations are performed. Each of these operations is assigned a numeric code, this is the opcode. To assist in the use of these numeric codes, mnemonics are used as textual abbreviations. It s much easier to remember ADD than 05, for example.

=See also=

  • Machine language