|
How a computer processes information The instructions that are decoded in the Control Unit of a processor are just binary numbers. The first number a processor receives is always assumed to be an instruction to do something, it may be an instruction, for example, to move to another part of the program, store a value to a memory location or load a value from a memory location. The numbers that follow the instruction will represent, for example, a memory location or a value, which it is will depend on the instruction given. Each processor has its own instruction set - a set of numbers that represent these instruction codes. The actions taken for a specific instruction code is held in a read only memory (ROM 1) section in the CPU. In order to write programs, a programmer must write these instruction codes and values in a manner that the CPU can understand, i.e in numbers in the correct sequence. The numbers that represent the codes can be very large and there may be many codes that the programmer needs to remember. Although the CPU is built to operate on numbers, it easier for a human beings to remember words rather than numbers. Each instruction code number has an action, for example -move and store the following value to the memory location or register 2 given in the number which follows the value. This is rather a lot to remember, and type in, so it can be represented by a mnemonic 3 such as MOV. So the programmer would only need to input an instruction in a similar way to that below: mov ax, 4c00h 4 This instruction with the mnemonic 'mov' loads the value 4cooh is loaded into the ax register. A Program is made up of a series of these instruction mnemonics and values in the correct order for carrying out a specific task. A sample program may look like that given below:
|
