Object Code


lightbulb

Object Code

Object code is a low-level machine language representation of a computer program that has been compiled or assembled from a higher-level language, and is the final form of the program that is executed by the computer’s processor.

What does Object Code mean?

Object code is the final form of a computer program that is directly executable by a specific computer architecture. It is generated by a compiler or assembler from source code written in a high-level language. Object code is typically written in a binary Format, meaning it consists of a series of 0s and 1s.

The Process of converting source code to object code is called compilation. A compiler translates the high-level source code into an intermediate representation, which is then translated into object code by an assembler. The assembler assigns specific machine instructions to each instruction in the source code.

Object code is specific to a particular computer architecture. This means that object code generated for one type of computer will not run on another type of computer. For example, object code generated for an X86 processor will not run on a PowerPC processor.

Applications

Object code is used in a wide variety of applications, including:

  • Operating systems
  • Compilers
  • Interpreters
  • Device drivers
  • Embedded systems

Object code is important because it allows computer programs to be executed efficiently. By converting source code to object code, a compiler or assembler can optimize the code to take advantage of the specific features of the computer architecture. This can result in significant improvements in performance.

History

The concept of object code was first developed in the early days of Computing. In the 1940s, programmers began to develop assemblers that could translate assembly language code into object code. This made it easier to write programs for specific computer architectures.

In the 1950s, compilers were developed that could translate high-level languages into object code. This made it even easier to write programs for a variety of computer architectures.

Today, object code is the most common way to distribute computer programs. Object code is typically stored in files with the Extension “.o” or “.obj”.