How instructions are differentiated from data?

Simple answer – it doesn’t. Machine code instructions are just binary numbers, as are data. More complicated answer – your processor may (or may not) provide segmentation of memory, meaning that attempting to execute what has been specified as data causes a trap of some sort. This is one of the the meaning of a “segmentation fault” – the processor tried to execute something that was not labelled as being executable code.

Leave a Comment