Difference Between Executable and Non Executable Files

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

Key Terms

Executable Files, Non Executable Files

Difference Between Executable and Non Executable Files - Comparison Summary

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.

Difference Between Executable and Non Executable Files

Figure 1: Running an executable file

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.

Main Difference - Executable vs Non Executable Files

Figure 2: Word and Excel Files

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)

Internet Related files – .html (Hyper Text Markup Language file), .css (Cascade Style Sheets file), .js (JavaScript file), .jsp (Java Server Pages 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

Definition

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.

Execution

The CPU can directly execute executable files. The CPU cannot directly execute non-executable files.

Types

Executable files can be compiled programs or scripts. Non executable files can be audio, video, image, spreadsheet, database, data, word files, etc.

Conclusion

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.

Reference:

1. “Executable File.” Plagiarism Definition, Available here.
2. “What Are the Most Common File Types and File Extensions?” Computer Hope, 1 Apr. 2018, Available here.

Image Courtesy:

1. “Open File – Security Warning’ by dawpa2000 (CC BY 2.0) via Flickr
2. “2907152” (CC0) via Pixabay

About the Author: Lithmee

Lithmee holds a Bachelor of Science degree in Computer Systems Engineering and is reading for her Master’s degree in Computer Science. She is passionate about sharing her knowldge in the areas of programming, data science, and computer systems.

Leave a Reply