Nepedia
Back to Discover
Fluent Reader
💻

Executable

technology Maturity 11-13 Next article →

An executable is a special kind of resource. It tells a computer how to behave. Most data is just information for a computer to store. However, an executable is different because it implies a flow of control. This means the computer follows specific instructions in order. People use many names for these files. They might call them executable code or an executable program.

Binary executable file2
Binary executable file2

How does a computer run these files? It depends on the type of code used. A native executable uses machine code. This code is read directly by the CPU. Other files are called scripts. A script needs an interpreter to work. There is also intermediate code like bytecode. This can be turned into native code while it is running. This process is called just-in-time compilation.

Binary executable file2
Binary executable file2

People rarely write machine code by hand. It is much easier to write source code. This code is written in a high-level language that humans can read. To turn this into a file, we use a toolchain. A compiler turns source code into object files. Then, a linker joins those files into one executable. If a person uses assembly language, they use an assembler instead.

Binary executable file2
Binary executable file2

Executable files have very specific rules. They must follow an application binary interface, or ABI. Some files use the ELF format. Others use the PE format. These formats help organize the file into sections. One section is called .text for the code. Another is .data for variables. There is also .rodata for things like strings.

Binary executable file2
Binary executable file2

An executable file does a lot of work behind the scenes. It often includes a runtime system. This system helps the program talk to the operating system. It manages tasks and handles errors. It also helps the program start and stop correctly. For the C language, a file called crt0 helps with this. It sets up the entry point for the program. This ensures the computer knows exactly where to begin.

Binary executable file2
Binary executable file2
322 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Binary executable file2.png
Binary executable file2.png
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.