answersLogoWhite

0


Best Answer

Source code is code written in a programming language, such as C++ or Java. It is designed to be architecture-independent and human-readable. Source code must be converted to object code (aka machine code) before it can be executed. Object code is architecture-dependent and is not easily human-readable (think ones and zeros).

The point of this setup is that you can ensure that code you write in a programming language (source code) can be executed on ANY architecture that has a proper compiler.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

"Source code" refers to the lines of code that a programmer types into the computer.

"Executable code" refers to the code that can run directly on your computer. This is usually obtained by compiling and linking your source code.

"Object code" may have different definitions, depending on who you ask. Often you'll see this term used to describe some intermediate form of code between source code and executable code.

One example I've seen is "object code" being used to refer to the middle step between the compiler and the linker. That is to say, the compiler turns your source code into this object code, which is then passed to the linker to turn into executable code.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

I assume you mean object code rather than object module. When you compile a source program, each translation unit is compiled to produce a separate object code file. An object code file contains the compiled machine code instructions. The linker is responsible for linking these object code files to produce the final executable. By compiling translation units separately, compile times can be dramatically reduced since only those translation units that have changed since the last compile need to be recompiled.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Source code deals with code the programmer writes to make a piece of software, while target code deals with code a compiler/linker deals with to make a binary file compatible with a particular architecture (i.e. x86, x64, ARM, RISC, etc).

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Source code is the category of computer language instructions that is most frequently written and read by software programmers. A computer cannot generally run a program in source code form though. The source code is translated, with the use of an assembler or compiler, into a language form that contains instructions to the computer known as object code. Object code consists of numeric codes specifying each of the computer instructions that must be executed, as well as the locations in memory of the data on which the instructions are to operate.While source code and object code are commonly referred to as different classes of computer language, these terms actually describe the series of transformations a program goes through when being converted from a higher level language more easily comprehensible to humans to the lower level language of computer operations.

By Muhammad Mansha Khan

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Source code is the code you write using C++ keywords and typed variables. Object files are the files produced by the compiler, which are subsequently used by the linker to create an executable file.

Source code generally consists of multiple .CPP source files, each with their own .H header files. An object file combines the source and header into a single object file. Under Windows, these object files use the common object file format (COFF). The full specification for these files is available as a downloadable document but, in essence, each object file contains section headers that inform the linker how to link the raw data (essentially the code and data segments) into the final executable. COFF files can also be used to build libraries of objects. The COFF files can generally be found in the intermediate debug/release folders after compiling a project.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

HERHGVJKRLWT\

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between source code and target code?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the difference between target code and source code?

Source code and target code are the input and output of programming language translation programs such as assemblers, compilers and interpreters. An assembler is used to convert low-level assembly instructions into native machine code, thus the source code is assembly language and the target code is native machine code. The target code is typically saved to a file known as an executable. Once converted to native machine code, no further translation is required; the executable can be executed at a later date and as often as required upon any machine of the same type and equivalent system and supporting libraries and software, and with optimal execution speed. An interpreter is used to convert a high-level language source to machine code while the source code is executing. The source code is executed by the interpreter but, unlike an assembler, the resultant machine code is not saved to a file. As such, the source code must be re-interpreted every time it is executed, thus execution speed is extremely slow. However, the source code is extremely portable and can be executed upon any machine that has a suitable interpreter. The main advantage of interpreted languages is that the source code can be changed while it is executing, so the programmer can see the effect immediately. A compiler is used to convert source code written in a high-level programming language to that of a lower-level target language. Typically the lower-level language is native machine code and, as with assembly, the target code can be saved and executed at a later date with optimal performance. However, not all compilers compile to machine code. Some compile to assembly (which requires an assembler to complete the translation) while others convert to an intermediate code known as byte code. Byte code is intended to be interpreted by a virtual machine and can be thought of as being the native language of the virtual machine. As with all interpreted languages, the byte code is extremely portable and can be executed upon any physical machine that supports the appropriate virtual machine implementation. Java is an example of this. Compilers can also translate code between two high-level languages so long as the target language is a lower level than the source language. The original C++ compiler worked this way, translating the C++ source into a C target which could then be compiled to machine code using the C compiler.


What are the differences between a compiler and a translator?

A compiler transforms source code from a source file into low-level machine code, which is able to be executed directly on the CPU. A translator feeds the source code of a script into a different program that determines what the code is doing and executes the instructions.


What is the difference between compilar and interpreter?

compiler is a software translator used in ProgrammingLanguage: C,C++, Java etc ). This used for to translate High level language to Machine independent language. Interpreter is used to translate source code to machine code by line by line.


What are the difference between opcode and operand?

What is difference between oppress code and operend


Where does source code come from in java?

Source code comes from the programmer...

Related questions

What is the difference between open-source and closed-source software?

The answer is in the question itself. Open-source software has it's source code available to everyone. Closed-source software does not.


What the difference between codes and standards?

Generally speaking a Code is something which must be adhered to, but a Standard is a guide, or target to be aimed at.


What is the difference between source code and target code?

Source code and target code are the input and output of programming language translation programs such as assemblers, compilers and interpreters. An assembler is used to convert low-level assembly instructions into native machine code, thus the source code is assembly language and the target code is native machine code. The target code is typically saved to a file known as an executable. Once converted to native machine code, no further translation is required; the executable can be executed at a later date and as often as required upon any machine of the same type and equivalent system and supporting libraries and software, and with optimal execution speed. An interpreter is used to convert a high-level language source to machine code while the source code is executing. The source code is executed by the interpreter but, unlike an assembler, the resultant machine code is not saved to a file. As such, the source code must be re-interpreted every time it is executed, thus execution speed is extremely slow. However, the source code is extremely portable and can be executed upon any machine that has a suitable interpreter. The main advantage of interpreted languages is that the source code can be changed while it is executing, so the programmer can see the effect immediately. A compiler is used to convert source code written in a high-level programming language to that of a lower-level target language. Typically the lower-level language is native machine code and, as with assembly, the target code can be saved and executed at a later date with optimal performance. However, not all compilers compile to machine code. Some compile to assembly (which requires an assembler to complete the translation) while others convert to an intermediate code known as byte code. Byte code is intended to be interpreted by a virtual machine and can be thought of as being the native language of the virtual machine. As with all interpreted languages, the byte code is extremely portable and can be executed upon any physical machine that supports the appropriate virtual machine implementation. Java is an example of this. Compilers can also translate code between two high-level languages so long as the target language is a lower level than the source language. The original C++ compiler worked this way, translating the C++ source into a C target which could then be compiled to machine code using the C compiler.


What is the difference between target code and source code?

Source code and target code are the input and output of programming language translation programs such as assemblers, compilers and interpreters. An assembler is used to convert low-level assembly instructions into native machine code, thus the source code is assembly language and the target code is native machine code. The target code is typically saved to a file known as an executable. Once converted to native machine code, no further translation is required; the executable can be executed at a later date and as often as required upon any machine of the same type and equivalent system and supporting libraries and software, and with optimal execution speed. An interpreter is used to convert a high-level language source to machine code while the source code is executing. The source code is executed by the interpreter but, unlike an assembler, the resultant machine code is not saved to a file. As such, the source code must be re-interpreted every time it is executed, thus execution speed is extremely slow. However, the source code is extremely portable and can be executed upon any machine that has a suitable interpreter. The main advantage of interpreted languages is that the source code can be changed while it is executing, so the programmer can see the effect immediately. A compiler is used to convert source code written in a high-level programming language to that of a lower-level target language. Typically the lower-level language is native machine code and, as with assembly, the target code can be saved and executed at a later date with optimal performance. However, not all compilers compile to machine code. Some compile to assembly (which requires an assembler to complete the translation) while others convert to an intermediate code known as byte code. Byte code is intended to be interpreted by a virtual machine and can be thought of as being the native language of the virtual machine. As with all interpreted languages, the byte code is extremely portable and can be executed upon any physical machine that supports the appropriate virtual machine implementation. Java is an example of this. Compilers can also translate code between two high-level languages so long as the target language is a lower level than the source language. The original C++ compiler worked this way, translating the C++ source into a C target which could then be compiled to machine code using the C compiler.


What is the difference between an open-source and a closed-source operating system?

Open-source means the source code is available to the end-user. The user can modify and change it, following the guidelines in the accompanying license. Close-source means that the source code is held by the developer, and only they can make any changes or study it.


What is the difference between source code and specially written software?

Source code means the form of the software which is the most suitable for human understanding; while 'specially written software' is... well, okay, I admit I have no idea what do you mean by that...


What are the differences between a compiler and a translator?

A compiler transforms source code from a source file into low-level machine code, which is able to be executed directly on the CPU. A translator feeds the source code of a script into a different program that determines what the code is doing and executes the instructions.


What is the difference between an open system and a closed system?

Open-source means the source code is available to the end-user. The user can modify and change it, following the guidelines in the accompanying license. Close-source means that the source code is held by the developer, and only they can make any changes or study it.


Do open source operating systems use binary code as a base like WindowsTM?

All operating systems have to use binary code in order to operate. The difference between open-source operating systems and Windows is that you can see the code before it is converted into a binary format.


What are the uses of compiler besides translation?

compiler is complex software compounding of scanner,parser,intermediate code generator , object code generator etc. Actually its tasks is to convert one language to another target language. then it may be possible that source language may be c# ,java , C source code and target language one of them or assembly language code.


What is the difference between debugger and translator?

debugger find error and tell us and we remove them manually.interpreter is a translatol that translate source code to macihne statement by statement.


What is the basic Difference between flow chart and pseudo-code?

what's the difference between flow chart and structure diagrams and pseudo code