Compare the Difference Between Similar Terms

Difference Between

Home / Technology / IT / Programming / Difference Between Source Program and Object Program

Difference Between Source Program and Object Program

May 19, 2011 Posted by Indika

The key difference between Source Program and Object Program is that Source program is a human-readable program written by a programmer while object program is a machine executable program created by compiling a source program.

Source programs can be either compiled or interpreted for execution. Decompilers helps to convert object programs back to its original source programs. It is important to note that the terms source program and object program are used as relative terms. If you take a program transformation program (like a compiler), what goes in is a source program and what comes out is an object program. Therefore, an object program produced by one tool can become a source file for another tool.

CONTENTS

1. Overview and Key Difference
2. What is Source Program
3. What is Object Program
4. Side by Side Comparison – Source Program vs Object Program in Tabular Form
5. Summary

What is Source Program?

The programmer writes the source program using higher level language. Therefore, it is easily readable by the humans. Source programs usually contain meaningful variable names and helpful comments to make it more readable. A machine cannot directly execute a source program. A compiler helps to transform source program to executable code to execute by the machine. Alternatively, is to use an interpreter. It executes a source program line by line without pre-compilation.

Difference Between Source Program and Object Program

Figure 01: A Source Program

Visual Basic is an example of a compiled language, while Java is an example of an interpreted language. Visual Basic source files (.vb files) are compiled to .exe code, while Java source files (.java files) are first compiled (using javac command) to bytecode (an object code contained in .class files) and then interpreted using the java interpreter (using java command). When software applications are distributed, typically they will not include source files. However, if the application is open source, the source is also distributed and the user gets to see and modify the source code as well.

What is Object Program?

Object program is usually a machine executable file, which is the result of compiling a source file using a compiler. Apart from machine instructions, they may include debugging information, symbols, stack information, relocation, and profiling information. Since they contain instructions in machine code, they are not easily readable by humans. But sometimes, object programs refer to an intermediate object between source and executable files.

Tools known as linkers helps to link a set of objects into an executable (e.g. C language). As mentioned above .exe files and bytecode files are object files produced when using Visual Basic and Java respectively. The .exe files directly execute on windows platform while bytecode files need an interpreter for execution.

Most software applications are distributed with the object or executable files only. It is possible to convert the object or executable files back to its original source files by decompilation. For example, the decompiler tools can decompile java.class files(bytecode) in to its original .java files.

What is the Difference Between Source Program and Object Program?

Source program is a human readable program written by a programmer. It is written in higher level languages such as Java or C. Therefore, a source program is human readable. It is not understandable by the machine.

On the other hand, Object program is a machine executable program created after compiling a source program. It contains lower level languages such as assembly or machine code. Therefore, the object program is not readable by the human. It is understandable by the machine.

Difference Between Source Program and Object Program in Tabular Form

Summary – Source Program vs Object Program

The difference between Source Program and Object Program is that Source program is a human readable program written by a programmer while object program is a machine executable program created by compiling a source program.

Reference:

1.“Source Code.” Wikipedia, Wikimedia Foundation, 17 May 2018. Available here

2.“Object Code.” Wikipedia, Wikimedia Foundation, 14 May 2018. Available here 

Image Courtesy:

1.’CodeCmmt002’By Dreftymac (CCBY 2.5) via Commons Wikimedia  

Related posts:

Difference Between Get and Post Difference Between JDK and JRE Difference Between Agile and Waterfall Difference Between Virtual and Abstract Difference Between Implements and Extends

Filed Under: Programming Tagged With: object program, Source program

About the Author: Indika

Indika, BSc.Eng, MSECE Computer Engineering, PhD. Computer Science, is an Assistant Professor and has research interests in the areas of Bioinformatics, Computational Biology, and Biomedical Natural Language Processing.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Request Article

Featured Posts

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and SARS

Difference Between Coronavirus and SARS

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Covid 19

Difference Between Coronavirus and Covid 19

You May Like

Difference Between Bail and Bond

Difference Between Bail and Bond

Difference Between Sugar and Glucose

Difference Between Accountant and Auditor

Difference Between Coal and Coke

Difference Between Bacterial Leaf Blight and Bacterial Leaf Streak

Difference Between Bacterial Leaf Blight and Bacterial Leaf Streak

Latest Posts

  • What is the Difference Between Squalane and Hemi-squalane
  • What is the Difference Between Anencephaly and Microcephaly
  • What is the Difference Between Neuroleptic Malignant Syndrome and Serotonin Syndrome
  • What is the Difference Between Resolutions and Goals
  • What is Difference Between Tay-Sachs Disease and Niemann-Pick Disease
  • What is the Difference Between Enucleation and Marsupialization
  • Home
  • Vacancies
  • About
  • Request Article
  • Contact Us

Copyright © 2010-2018 Difference Between. All rights reserved. Terms of Use and Privacy Policy: Legal.