What is Object Code in a Computer Program?

technology gadgets

When we talk about computers, we talk about machines that run on millions of lines of code. Computer programmers write code in various languages, but all of this code has some basic features, no matter which language is being used. A program always has two sets of code, source code and object code.

Source code is what is created beforehand, the language that the programmer uses to give instructions to the computer's compiler in order to make the program run. The result of the compiler having compiling these source code instructions is called object code. The terms are intuitive, in that source code is the means to the end that is object code. In other words, the source code is the beginning, or source, of the operation and the object code is the desired result, or object, of the whole exercise. Object code is stored in files that are created by the computer's compiler and can then become the ultimate end intended by the programmer.

Once source code has been compiled into files, it can then continue on to the computer's processor, which executes the final instructions. Commonly available software applications are huge collections of object code, which cannot be altered fundamentally since the source code is not included. It is like having the solution to the problem but not all the steps used to solve that problem. You may have object code to work with, but you don't have the original source code. Changing object code without having the source code can be an exercise in frustration.

This multi-step process is needed because computers can execute only those instructions that are written in machine language. That is the ultimate result, which is executed versions of object code. So when a consumer gets a software application, that consumer is getting an executed version of source code that became object code and finally became machine language that was transformed into the final project.

Given the current emphasis on open-source code, more and more applications are being released with avenues into the source code. Diligent programmers and coders can access that source code, change it around to meet their needs, and then create new object code, which fulfills a purpose that may be different than that intended by the original programmers.

Related wiseGEEK articles

Category

wiseGEEK features

Subscribe to wiseGEEK


FREE: Subscribe to wiseGEEK

 
    learn more

our strict privacy policy ensures that your email address will be safe



Written by David White


copyright © 2003 - 2009
conjecture corporation