Computer instructions

Updated: 12/31/2022 by Computer Hope

Computer instructions may refer to any of the following:

1. In computing, instructions are a segment of code containing steps that need to be executed. More plainly, they are a set of tasks that a program is "asking" a processor to carry out; they tell the processor what it should do. Essentially, for a computer to know how to do anything, it must be provided with proper instructions.

For example, to draw a square, a CPU (Central Processing Unit) requires instructions telling it to produce four sides of equal lengths, connected at 90-degree angles.

Example

Here is a set of instructions for Logo that would produce a square:

forward 100
right 90
forward 100
right 90
forward 100
right 90
forward 100

Output

These instructions would yield the image similar to the one shown below.

Logo instructions for a square.

How does a computer get instructions?

A computer is given instructions by a human using a keyboard or another input device. To interpret these instructions, the computer uses an operating system, interpreter, or software to translate user commands into something the computer can understand.

Note

The computer can process these instructions by following the computer's instruction set.

2. Computer instructions are steps or documentation that include information on how to operate, perform, or otherwise maintain particular computer software or hardware. If a program or hardware device includes an instruction manual or online instructions, we recommend reviewing it before asking questions.

Tip

With many programs, press the F1 key to get help and instructions on using that program.

3. With computer hardware, drivers give a computer instructions on how to use a connected device.

CPU terms, Data, Information, Instruction set, Logic, Operation code, Order, Program counter, Programming terms, RTFM, SOP