How does a CPU know if an address in RAM contains an integer, a pre-defined CPU instruction, or any other kind of data?
问题 The reason this gets me confused is that all addresses hold a sequence of 1's and 0's. So how does the CPU differentiate, let's say, 00000100 (integer) from 00000100 (CPU instruction)? 回答1: First of all, different commands have different values (opcodes). That's how the CPU knows what to do. Finally, the questions remains: What's a command, what's data? Modern PCs are working with the von Neumann -Architecture ( https://en.wikipedia.org/wiki/John_von_Neumann) where data and opcodes are stored