The computer performs all processing by "calculating," "comparing" and "copying" the data residing in memory (RAM). Programs and data are read from the computer's storage and written into memory. They can also be stored anywhere in the world and written into RAM from a network connection.
Data reside in large blocks in storage known as "sectors." After written into RAM, any single byte can be manipulated independently. This interplay is how computers process all data. See storage vs. memory
Calculate - Compute Amounts and Keep Track
A computer can add, subtract, multiply and divide numbers to compute money amounts and process myriad mathematical algorithms. The computer's calculating capability also enables it to keep track of its own internal iterations for all the tasks it performs.
Compare - Match One Set With Another
The computer can look at two sets of data and determine whether they are equal or which set is higher or lower in value. Providing the "if this-do that" logic, comparing is performed for searching, analyzing and evaluating data for countless purposes.
Copy - From One Place to Another
The computer can rearrange data for organizing and reporting by copying data from one area in memory to another. In fact, in France and Spain, a computer is actually called an "organizer" because computers do an enormous amount of copying (see ordinateur
and computers are copy machines
It All Begins with Software
Compare to Find Things
No processing can occur without first writing the program into RAM. This is a conceptual example because real instructions are contiguous. In addition, although interpreted languages remain in source code throughout processing, instructions are often in machine language. Because every byte has its own address, each instruction is independently extracted into the CPU. See byte addressable
, machine language
This example counts all California records in the database by comparing each one in RAM to "CA," which is a constant created in the program. If equal, a "1," also created in the program, is added to a group of bytes defined as a counter. Each record is written into the same RAM buffer and compared until the last record has been examined.
Copy to Display and Print
Compare and Copy to Sort
Data are stored as contiguous fields in a database but are rendered for humans by copying the characters into the desired order. Dashes are typically not stored as data. They are copied into the required format by the program (see picture
Copy and Calculate to Edit
Resequencing data is accomplished by comparing each item with the others and copying it into the appropriate order. There is also significant calculating going on to keep track of what goes where. Data records are generally indexed, and instead of sorting the actual records, the much smaller indexes are sorted (see index
Part of word processing's magic is copying. In this example, in order to insert the "O" from the keyboard, the remaining characters are copied one byte to the right to make room. This illustration is very conceptual, with the actual process requiring many complex calculations of beginning and ending locations.