answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How does the CPU differentiate between command and data?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a command to the CPU to perform one processing function on one or two data inputs?

An instruction is a command to the CPU to perform one processing function on one or two data inputs.


What does a CPU bus do?

the CPU bus is the connection between the motherboard and the CPU. All data flows through different data bus.


What is difference between data and instruction?

Data is what is saved inside while instructions is what u instruct to do


Does data use the CPU?

The CPU processes data, so data would be using the CPU.


What controls the flow of data between the computer and network cable?

The Network Interface Card (NIC) or modem (Dial-up) controls the flow of data between your computer and the cable.


What is the term for very fast memory used to store data or instructions between the CPU and regular memory?

Very fast memory used to store data or instructions between the CPU and regular memory is called cache.


Data is transmitted between the CPU and L2 cache over what?

The Front Side Bus


Is a measure of the total bandwidth of data moving between the module and the CPU?

PC Rating


Method of transferring data between the hard drive and memory that involves the cpu?

DMA


What is the use of command input?

cpu


Where data is stored in CPU?

In a CPU, data is stored in registers, which are small storage locations within the CPU itself. Registers are used to hold data that is actively being processed by the CPU, such as instructions, memory addresses, and temporary calculations. Data can also be temporarily stored in the cache memory in the CPU for faster access.


What is the difference between Harvard and Princeton computer architecture?

Harvard architecture : _________ ______ | code | | | | memory | | CPU | <-----> |_________| | | | | ----------- | data | | memory | ---------------- the CPU generated address is either point to code or data memory. Princeton arhitecture: data memory <--------> CPU <-------> code memory in this the CPU generated address will point to both the data and code. for this some internal operation are take place to point to either data or code. answered by prasad. mail prasad40613@gmail.com