Computer Operation and the instruction format

Computer Operation: We know the basic architecture of a computer, now we will learn about different types of operations performed by the computer.

Data transfer instructions: All CPUs provide different instructions for the transfer of data from and to the memory. A programmer can use these instructions to bring data into the CPU and copy data from the CPU to the main memory. Instructions have the following format.

Computer Operation and the instruction format

Arithmetic and Logical instructions:

Another important category of operations a CPU can do is Arithmetic and logical operations. Most CPU provides the basic arithmetic operations of add, subtract, multiply and divide for signed numbers and floating point numbers. Logical operations of comparing two numbers, performing XOR of number, shifting and rotating a number are some common form of logical operations provided by the CPU.

I/O Instructions:

Every CPU provides if users with the operations of reading data from a peripheral device and writing data to a peripheral device. To use these operations a programmer may use input and print commands provided by the CPU.

Control Transfer:

In all real world programs, given to the CPU must be repeated a number of times. To support such operations, all CPUs provide its programmers with control flow operations some examples of these operations are:

Jump, Jumpz (jump if zero)

Instruction set:

Each CPU provides its users with a number of instructions so that the users can perform different operation supported by the CPU. The set of all instructions provided by a CPU is commonly known as the instruction provided by the most modern CPU manufacturers and see how these instructions are used to solve different problems. Most commonly the CPU provides the following instructions to the programmers