2. Mnemonics

The registers within a CPU store and process binary data. Like this

In theory the programmer could load data and instructions directly into the registers in pure binary, like this

10110000 00110010

This one happens to instruct an Intel 8086 processor to load 32 into its accumulator. But you would be hard pushed to know that!

A slightly more person-friendly way of coding this would be to code the same instruction in hexadecimal. Like this

B0 32

This is 'machine code' and it is very difficult to program at this level and yet retain an understanding of what the software is doing. So the CPU chip makers supply a set of Mnemonics for the programmer to use with their processors.

Mnemonics are a set of readily memorised programming instructions that are later translated into pure machine code by a piece of software called an 'assembler'.

For example the machine code above in mnemonic form looks like

MOV AL, 32h

This is now making much more sense to the programmer. You can see that the command is instructing the CPU to load 32 hex immediately into a register called AL. It is common practice for the CPU registers to have a two or three letter name.





Copyright © www.teach-ict.com