next up previous contents
Next: Computer architecture Up: Background information Previous: What is a computer?   Contents

Programs

Okay, so a computer can perform various simple operations, such as adding, subtracting and etc. How does a computer know in which order to perform these operations?

Well, the computer does not really know in which order to perform the operations. Instead, it follows some instructions to perform the operations. Vaguely speaking, these instructions supplied to the computer is a program.

How do we write instructions for a computer? Unfortunately, a computer does not understand English, Russian, Japanese, Chinese or any other natural languages. Natively, a computer only understands binary numbers (more on this later). In other words, the vocabulary of a computer makes up of words in zeros and ones only.

Well trained programmers can write small programs using this ``native'' format that computers understand. However, even for well trained programmers, writing programs in this native format is inefficient. In other words, a programmer can only write very little code per day.

In this class, we benefit from a tool called an assembler. Instead of specifying instructions in zeros and ones only, we can use weird words called ``mnemonics'' to represent what an instruction does. In fact, we'll spend quite a bit of time talking about these mnemonics.


next up previous contents
Next: Computer architecture Up: Background information Previous: What is a computer?   Contents
Tak Auyeung 2003-11-10