What is the basis difference between an executable file and a non-executable file? is it just that the bytes of an executable are arranged in a meaningful order which a CPU can understand as instructions?
What is the basis difference between an executable file and a non-executable file? is
Share
An executable file contains an operating system specific header indicating that the file is meant to hold executable instructions, as well as the instructions themselves. Typically though not universally certain file extensions are either common by convention or required to indicate that a file is executable in addition to the file having a valid header.
If the operating system is told to execute a file, it will check the file header and possibly file extension and, if those match the rules for executability (after possibly checking security concerns as well), the operating system will load the file into memory and attempt to execute the instructions therein.
There’s a good overview on Wikipedia
http://en.wikipedia.org/wiki/Executable_and_Linkable_Format
http://en.wikipedia.org/wiki/EXE