< previous page page_8 next page >

Page 8
0008-01.gif
Figure 1-3
Programming Shortcut?
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif 3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Documentation The written text and comments that make a program easier for others to understand, use, and modify.
After you write a program, you must give the computer the information or data necessary to solve the problem. Information is any knowledge that can be communicated, including abstract ideas and concepts. Data are information in a form the computer can usefor example, numbers and letters.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif 3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Information Any knowledge that can be communicated.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif 3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Data Information that has been put into a form a computer can use.
THEORETICAL FOUNDATIONS
Data Representation
In a computer, data are represented electronically by pulses of electricity. Electric circuits, in their simplest form, are either on or off. Usually a circuit that is on is represented by the number 1; a circuit that is off is represented by the number 0. Any kind of data can be represented by combinations of enough 1s and 0s. We simply have to choose which combination represents each piece of data we are using. For example, we could arbitrarily choose the pattern 1101000110 to represent the name C++.
Data represented by 1s and 0s is in binary form. The binary (base-2) number system uses only 1s and 0s to represent numbers. (The decimal [base-10] number system uses

(text box continues on next page)

 
< previous page page_8 next page >