In general the only difference between commands, or instructions, and data is the context in which each appears. If the CPU is fetching the contents of memory to get the next instruction, then it assumes that the Program Counter register points to commands. If the CPU is executing an instruction that needs to fetch data from memory, the data at the address specified by the instruction are fetched, assuming that the address points to data.
This is what allows a program to be loaded into memory in the first place; the part of the operation system responsible for this operation treats the program as data, loading it into memory as instructed in the file. Then the OS branches to a specified place within that memory and begins fetching instructions there.
This blurring between instructions and data has also been used in the past to allow a program to modify itself as it executes. This is usually considered poor practice; some operating systems, such as HP's OpenVMS, even set up memory page protections to keep this from happening.
Chat with our AI personalities
They tell the CPU where to find the data, when to read it, and what to do with it.
Cache memory is used to hold a copy of the data from the most frequently accessed memory locations to minimise calculation time. For example, a CPU's cache will hold this data so that it doesn't have to call data from the RAM for every calculation it makes, and merely draws from its local cache.
cache
Pipeline processing involves a string of data processed in a chain reaction. This means the output of the first data point processing is the input of the next processing point. Vector processing involves a CPU and only one-dimensional arrays of data. This is similar to how a basic computer functions.
Your computer's processor is its brain. Sometimes called a central processing unit, or CPU, your processor manipulates data in response to your instructions. Together with the memory and video card, the CPU determines your computer's overall performance. An understanding of how processor speed works can help you purchase the right computer for your business or evaluate an existing computer's performance.