Vocademy |

The history recounted above was presented for more than just perspective. It is intended to show that microprocessors are relatively simple. Computers can do very complex things. However, they do them with only a few simple functions. The following is a list of the basic functions of a microprocessor:

- Read a byte of data from memory and copy it to an internal register.
- Read a byte of data from an internal register and copy it to memory.
- Add two bytes together.
- Complement a byte of data (turn the 1s to 0s and the 0s to 1s).
- Perform the Boolean AND function on two bytes of data.
- Perform the Boolean OR function on two bytes of data.
- Perform the Boolean Exclusive OR function on two bytes of data.
- Compare two bytes of information to see if they are equal.
- Based on a previous compare operation, either continue with the next instruction or jump to a different part of memory and follow instructions there (conditional branch).

These nine operations are all that are required for a modern digital computer. Most microprocessors actually have more operations, but these nine operations can be combined to do anything necessary. For example, you may notice that there is no operation to subtract one byte from another. That is because subtraction can be done without a direct subtraction operation. The steps would be:

- Convert one byte of data to a negative number (complement then add 1).
- Add this to a second byte of data.

This will subtract the first byte from the second byte (many microprocessors have a direct subtract operation and eliminate the complement operation). To multiply x times y, simply add x to itself y times. For example, 2 X 3 is the same as 2 + 2 + 2. Division is performed by repeatedly subtracting one number from another. A decrement operation (subtract 1) is available with all microprocessors, which simplifies multiplication and division as well as other operations. Some other operations that most microprocessors have, in addition to the nine listed above, are:

- Add 1 to an internal register (increment).
- Subtract 1 from an internal register (decrement).
- Subtract one byte from another (direct subtract).
- Shift all bits right.
- Shift all bits left.

Today's 64-bit multi-core processors still do the same things as the simple processors noted above, only faster and more efficiently. The improvements in modern processors will be discussed later after more fundamentals are covered.

Vocademy |