Content deleted Content added
edited direct to Opcode Systems |
No edit summary |
||
Line 1:
A computer can perform operations, each of which is assigned a numeric code called an '''opcode'''. To assist in the use of these numeric codes, [[mnemonic]]s are used as textual abbreviations. It's much easier to remember ADD than 05, for example.▼
Microprocessors perform operations using binary bits (on/off/1or0).
Four bits is equal to a byte, and two bytes is equal to a word.
as an example lets design a crude 4-bit microprocessor.
all registers/ALU/counter/address have a data path of 4-bit wide.
and all of our instructions must fit in a 3-bit address.
these are the
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..
this is a better explanation then whats below..cleanUpLater..
▲
Opcodes operate on [[processor register|registers]], values in [[memory]], values stored on the [[Stack (computing)|stack]], [[I/O]] ports, the [[Computer bus|bus]], etc. They are used to perform arithmetic operations and move and change values. Operands are the things that opcodes operate on.
|