Programming
Author | Ronda Henderson |
Pages | 616-618 |
Page 616
A computer can be an extremely efficient technological tool. The use of computers provides humans with the ability to perform a variety of tasks. The actual computer, however, does little on its own. Computer programs enable the computer, or the hardware, to perform a desired function or task. Computer programs are step-by-step instructions written specifically to instruct the computer on how to accomplish a task. The act of writing these computer programs is referred to as programming.
A programming language includes the rules defining how a computer program is written. Computer programs fall into two major types of programming languages: low-level languages and high-level languages. Low-level languages are more similar to machine language, which is the language that computers understand directly. High-level languages, however, are often more similar to English and easier for humans to understand.
Initially, programmers used machine language to write computer programs. The computer's "native language" is comprised of a series of binary digits. Binary digits, referred to as bits, are the basic units of memory and can store only two different values, 0 or 1. A group of eight bits makes up a byte and is the amount of memory used to store one character of information, such as a letter or number. Each central processing unit (CPU) for a computer has a unique machine language.
Figure 1
Code for computing gross pay for an employee
Code for computing gross pay for an employee | |
Machine language | |
LOAD | GROSSPAY |
SUBTRACT | DEDUCTIONS |
STORE | NETPAY |
High-level language | |
NetPay=GrossPay-Deductions |
For example, the machine language for an IBM computer model is unique compared to that of a Macintosh computer model. Because machine-language programming is extremely time-consuming and cumbersome, programmers began using English-like abbreviations to code the programs. This method of coding resulted in the development of assembly languages. With these languages, assemblers convert or translate the English-like code into machine language, increasing the speed at which programs can be written.
Although assembly languages improved the efficiency of program development, these languages still required many instructions to perform simple tasks. High-level languages were developed to improve programming efficiency by requiring fewer coding statements to accomplish more tasks. These languages use compilers or interpreters that convert...
To continue reading
Request your trial