The main difference between executable and non executable files is that the executable files are directly executed by the CPU while the non executable files are not directly executed by the CPU.
An executable file is executed by the CPU when opening the file. It can be a compiled program or a script. The main executable file format for Windows is .EXE while Mac Computers has the .APP format. However, it is important to avoid running executable files from unknown sources as they may contain malicious code. Directly running unreliable executable files can affect the data and resources in the computer. Other file types such as audio, image, video, word, spreadsheet, data files fall under non-executable files. These files are not directly executable by the CPU. Moreover, they can have various file formats depending on the file type.
Key Areas Covered
1. What are Executable Files
– Definition, Types
2. What are Non Executable Files
– Definition, Types
3. Difference Between Executable and Non Executable Files
– Comparison of Key Differences
Executable Files, Non Executable Files
What are Executable Files
An executable file is a type of computer file that runs a program when it is opened. In other words, it executes a set of instructions when opening the file. Executable files can be compiled programs or scripts. The main extension type of executable files in windows is .EXE and .APP in Mac Computers.
The source programs of these files are converted into binary files. Therefore, they can be directly executed by the CPU. A Mac computer cannot run an .EXE file and a windows computer cannot run an .APP file. That is because the operating system cannot recognize the format to execute the code.
A script contains a set of instructions. The user can open these files in text editors and view the code. These scripts require an interpreter to run. For example, a Python Script requires a Python interpreter to execute the code. A PHP script requires a PHP interpreter to execute the code. If these interpreters are not available, the scripts will open as text files.
What are Non Executable Files
The files that are not directly executed by the CPU are known as non-executable files. There are various non executable files available in a computer.
Following are some non-executable file types with examples.
Audio files – .mp3, .wpl
Compressed files – .tar, .z, .zip
Data and database files – .dat (data files), .db (database files), .csv files (comma separated value files), .log (log files), .xml, .sql
System files – .dll (DLL file), .sys (Windows System file), .tmp (Temporary file)
Presentation files – .ppt (PowerPoint file)
Spreadsheet files – .xsl (MS Excel file)
Word and Text files – .doc (Microsoft Word file), .pdf (PDF file, .txt (Plain text file)
Image files – .bmp (Bitmap image files), .gif (GIF image), .jpg, .jpeg (JPEG image), .png (PNG image), .tif (TIF image)
Video files – .avi (AVI file), .mp4 (MPEG4 video file), .mpg (MPEG video file), .wmv (Window Media Video file)
Difference Between Executable and Non Executable Files
An executable file is a file that can be directly executed by the computer and is capable of performing the indicated tasks according to the encoded instructions. A non-executable file is a file that is not directly executed by the CPU and is created for a specific task.
The CPU can directly execute executable files. The CPU cannot directly execute non-executable files.
Executable files can be compiled programs or scripts. Non executable files can be audio, video, image, spreadsheet, database, data, word files, etc.
The difference between executable and non executable files is that the executable files are directly executed by the CPU while the non executable files are not directly executed by the CPU. Running an executable file can damage the data and resources if it consists of any malicious software.