What types of instructions are found in a computer?

3

3 Answers

Oddman Profile
Oddman answered
Multi-volume sets of manuals for one of Intel's latest can be downloaded here.

The types of instructions depend a bit on the type of computer. Most computers these days have a Von Neumann architecture. However, security issues have forced development of methods to prevent execution of data.

This architecture dictates that computers have instructions for fetching data from memory, storing data to memory, and performing desired operations. Usually, the "desired operations" include various arithmetic and logical operations (add, subtract, multiply, divide, shift bits right or left, and, or, not, and so on). Because computers are called upon to change their behavior based on the values they compute, there are also instructions that test results (greater than, less than, equal, not-equal, and so on), and that change the order of instruction execution based on the results of those tests (jump on condition).

The location in memory of instructions being fetched, as well as the values of various computation results constitute the "state" of a given task. There are also instructions for saving and restoring that state, so that tasks can be switched. Some tasks are given privileges for memory access or state control, and there are instructions for assigning those privileges.

Modern processors can adjust their speed or power usage based on time or temperature, and there are instructions for reading those conditions and making those adjustments. Some microcontrollers have "peripheral" hardware built in for various purposes, including timekeeping, signal generation, reading values of analog signals, producing analog signals, reading various communication channels, generating data on a communication channel. Different instructions  are made available for handling these functions as well.

If you want to try your hand at programming a computer chip, you can get a development kit here for relatively low cost. It can give you an introduction to the types of instructions computers have available.
Ray Dart Profile
Ray Dart answered
If you are talking about the low-level instructions understood by a computer CPU that make up an executable stored program, then there are a lot of them. You could do worse than looking at Intel's data sheets for the x86 processor series, or an examination of the Microsoft Assembler MASM. These are available on the web, and you'll find quite a nice description if you wiki for "machine code". Make sure you understand what registers, pointers and indexes are first (all explained in there).

Answer Question

Anonymous