<< Chapter < Page Chapter >> Page >
Explains what a computer program is.

A program is a set of instructions that are grouped together to accomplish a task or tasks. The instructions, called machine code or assembly code consist of things like reading and writing memory, arithmetic operations, and comparisons. While these instructions sound simple, it is actually possible to solve a huge group problems with them. The difficulty in doing so is that you must specify in exact detail precisely how. Good programming is both an art and a science, and what you will learn today is a beginning of the craft.

As mentioned above, the individual instructions that the machine actually quite simple or low-level in computer parlance. Writing complex programs in assembly code took such a long time that eventually better programming languages were invented. A programming language, like C, is a formal set of grammar and syntax like assembly code; but the instructions in high-level languages encompass hundreds of assembly instructions. Programs called compilers translate a program written in a higher level language into assembly so that the computer can actually execute the instructions. Compilers let the programmer write programs so that humans can read them easily while the computer can still execute the instructions.

Generally programming code is organized into text files with suffixes that indicate the programming language. In the case of C these files are appended with .c, and a C program is made up of at least one of these files.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Microcontroller and embedded systems laboratory. OpenStax CNX. Feb 11, 2006 Download for free at http://cnx.org/content/col10215/1.29
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Microcontroller and embedded systems laboratory' conversation and receive update notifications?

Ask