Nepedia
Back to Discover
Fluent Reader
💻

Object code

technology Maturity 11-13 Next article →

Computers need instructions to do any job. One type of instruction is called object code. This code is the result of a special process. A tool called a compiler or an assembler makes it. It is a sequence of statements or instructions. These instructions are often in machine code. Machine code is a binary language.

This code is the goal of the compiling process. It is a very important part of making software.

How does this work step by step? First, a tool like an assembler takes code. It converts assembly code into machine code. This machine code is the object code. This code is just one part of a program. It is not a complete program yet. It may have placeholders or offsets inside it. These are spots for the linker to fill in later.

The linker uses these spots to connect everything together.

Learning about these tools helps us see how programs grow. Early sources even called the original code a "subject program." This shows how the object code was the final goal. We use different tools to reach that goal. An assembler turns assembly code into machine code. Some compilers can even skip the object step. They can go straight to making an executable file.

This shows how much the process can change.

There are many specific facts about these files. An object file is a portion of machine code. It is for one particular library or module. It is not yet linked into a complete program. An object file usually starts at a specific memory location. This location is often zero. The file contains info about instructions for memory. This helps the linker move the code later.

This is how the linker combines multiple files.

Think of object code like a single puzzle piece. One piece is not a whole picture. You must join many pieces to finish the job. A tool called a linker joins these files. It can join object files and library files. This creates an executable file or a library file. An executable file is a program that can run.

It is like building a big machine from small parts. All these parts must fit together perfectly.

365 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

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.