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, 2011Posted byIndika

Thekey differencebetween Source Program and Object Program is thatSource 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 acompiler), 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.

另一方面,对象exe程序是一个机器cutable 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

源程序和对象的区别rogram 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)viaCommons 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:ProgrammingTagged 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 ReplyCancel 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 Emo and Jock

Difference Between Emo and Jock

Difference Between Blackberry Bold 9000 and Bold 9900 Touch Screen

Difference Between HTC Windows Phone 8X and Windows Phone 8S

Difference Between Personal Unconscious and Collective Unconscious

Difference Between Personal Unconscious and Collective Unconscious

Difference Between Exact and Accurate

Latest Posts

  • What is the Difference Between Avobenzone and Benzene
  • What is the Difference Between Tight Junction and Adherens Junction
  • What is the Difference Between Hemorrhagic Stroke and Aneurysm
  • What is the Difference Between Zakat and Sadaqah
  • What is the Difference Between Papules and Pustules
  • What is the Difference Between Ubiquinol and CoQ10
  • Home
  • Vacancies
  • About
  • Request Article
  • Contact Us

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