answersLogoWhite

0

This section applies to most common RAM machine-based computers.

In most cases, computer instructions are simple: add one number to another, move some data from one location to another, send a message to some external device, etc. These instructions are read from the computer's memory and are generally carried out (executed) in the order they were given. However, there are usually specialized instructions to tell the computer to jump ahead or backwards to some other place in the program and to carry on executing from there. These are called "jump" instructions (or branches). Furthermore, jump instructions may be made to happen conditionally so that different sequences of instructions may be used depending on the result of some previous calculation or some external event. Many computers directly support subroutines by providing a type of jump that "remembers" the location it jumped from and another instruction to return to the instruction following that jump instruction.

Program execution might be likened to reading a book. While a person will normally read each word and line in sequence, they may at times jump back to an earlier place in the text or skip sections that are not of interest. Similarly, a computer may sometimes go back and repeat the instructions in some section of the program over and over again until some internal condition is met. This is called the flow of control within the program and it is what allows the computer to perform tasks repeatedly without human intervention.

Comparatively, a person using a pocket calculator can perform a basic arithmetic operation such as adding two numbers with just a few button presses. But to add together all of the numbers from 1 to 1,000 would take thousands of button presses and a lot of time, with a near certainty of making a mistake. On the other hand, a computer may be programmed to do this with just a few simple instructions. For example:

mov No. 0, sum ; set sum to 0 mov No. 1, num ; set num to 1 loop: add num, sum ; add num to sum add No. 1, num ; add 1 to num cmp num, #1000 ; compare num to 1000 ble loop ; if num <= 1000, go back to 'loop' halt ; end of program. stop running

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How does a laptop apple compare to a desktop apple?

The largest difference between any laptop computer and desktop computer is that a laptop is portable and a desktop is not. If you do not require you computer to be portable then a desktop computer is preferable as it will be cheaper to purchase than a laptop of equal specs.


Which is Better Wireless Network Desktop or Wireless Network Laptop?

It's a matter of choice. If you like flexibility laptop will be better for you. If you do not mind to have your computer at the same place desktop will work for you.


What does a laptop offer that a computer does not?

A laptop offers the portability that a desktop computer does not. You can take a laptop with you on flights and on travel trips while you cannot bring a desktop computer.


Is a desktop a laptop?

the desktop is the thing that you see when you start your laptop with the icons etc. the laptop is the computer (portable)


What are 10 differences between laptop and desktop computer what are 10 differences between laptop and desktop computer what are 10 differences between desktop and laptop computer?

laptop have fast speed this is wrong answer plz give me the answer og this qyesion plzz


Is it better to get a desktop computer or a laptop for college?

It depends on the person. A laptop would be good for college because you can take it around with you. A desktop is standard and if you need something to do at school. You would have to use the school desktop computers.


What is the antonym of laptop?

Desktop computer


Where is desktop on a laptop?

The main screen of laptop where you can see icons like my computer, my documents is desktop


You want to buy a computer for practice what will be better desktop or laptop?

if your going to go somewhere to practice sometimes laptop, but if your only practicing in 1 place (like your room or something) then a desktop.


Why is a laptop called a laptop?

It is called a laptop because a desktop is a computer that goes on a desk where as a laptop is a computer that goes on someones lap.


How do laptop computers cool?

at the back of the laptops is a cooling fan, it is not as powerful as the desktop computers but if is sufficent if you play games on the laptop it might over heat there for it would be better to play games on a desktop computer!!


What is one difference between a laptop and a desktop computer?

A desktop is larger and sits on a desk. A laptop is smaller and portable; you can carry it with you.