Here you will learn about difference between source code and object code.

在这里,您将了解源代码和目标代码之间的区别。

Source Code

源代码

Source Code, as the name suggests, it is the source of a program, the file original which is written by the programmer.

顾名思义,源代码是程序的源代码,是由程序员编写的原始文件。

The line above is sufficient if you are looking for a definition of the Source Code, adding to this, the following points will help in a better understanding of the topic.

如果您正在寻找源代码的定义,那么上面的代码行就足够了,此外,以下几点将有助于您更好地理解该主题。

Source Code refers to file which is a text based document that is written by the programmer. The programmer writes the code for performing some task in the human readable language, almost English every time, and saves the file into a prescribed format. For Example – ‘.java’ for JAVA code, ‘.cs’ for C# code, etc. This file is written following some conventions and rules of a particular programming language that can be any high level language of programmer’s choice and is saved accordingly with the correct extension. The Source Code is human readable but machines can’t understand instructions given in English, or any other human language, directly so this code is actually of no use to the machine until compiled by the compiler of the language into machine executable code.

源代码是指文件,它是程序员编写的基于文本的文档。 程序员用人类可读的语言(几乎每次都是英语)编写用于执行某些任务的代码,然后将文件保存为规定的格式。 例如,“。java”代表JAVA代码,“。cs”代表C#代码,等等。该文件是遵循特定编程语言的某些约定和规则编写的,这些惯例和规则可以是程序员选择的任何高级语言,并相应地保存为正确的扩展名。 源代码是人类可读的,但是机器无法直接理解以英语或任何其他人类语言给出的指令,因此,直到该语言的编译器将其编译成机器可执行代码后,该代码才真正对机器没有用。

Source Code is served as an input to the compiler of the language in which it is written.

源代码被用作编写语言的编译器的输入。

Object Code

目标码

Object Code is the machine executable file having instructions for the machine in the form of binary digits, generated by the compiler.

目标代码是机器可执行文件,其中包含由编译器生成的二进制形式的机器指令。

Definition is self explanatory but adding to this following explanation can provide a good understanding.

定义是不言自明的,但是在以下说明中加进可以提供很好的理解。

First of all, Object Code is the output of the compiler and is a binary file having instructions that were given by the programmer in the Source Code. These instructions are encoded in the binary digits and Object Code is machine readable, or better to say machine executable code, but not human readable, until and unless programmer is an expert in binary coding.

首先,目标代码是编译器的输出,并且是一个二进制文件,具有由程序员在源代码中给出的指令。 这些指令以二进制数字编码,并且除非且除非程序员是二进制编码专家,否则目标代码是机器可读的,或者说机器可执行代码,但不是人类可读的。

Object Code is generated through a process called compilation, carried out by compiler to convert Source Code into the machine executable code.

目标代码是通过称为编译的过程生成的,该过程由编译器执行以将源代码转换为机器可执行代码。

Object Code is system architecture specific, i.e., the file generated by the compiler at one machine might not work on other machines with different system architecture, or underlying structure. Though this problem is solved by the use of Intermediated Code and Just In Time Compiler but still many languages, like JAVA, follow the traditional way of object code generation.

目标代码是特定于系统体系结构的,即在一台计算机上由编译器生成的文件可能无法在具有不同系统体系结构或基础结构的其他计算机上运行。 尽管通过使用中介代码和即时编译器可以解决此问题,但是仍然有许多语言(如JAVA)遵循目标代码生成的传统方式。

Last point about Object Code is the way the changes are reflected. When the Source Code is modified, each time the Source Code needs to be compiled to reflect the changes in the Object Code.

关于目标代码的最后一点是反映更改的方式。 修改源代码后,每次需要编译源代码以反映目标代码中的更改。

This was a description about both the type of codes.

这是关于两种代码类型的描述。

The following table concludes the difference between the two.

下表总结了两者之间的区别。

源代码与目标代码–源代码与目标代码之间的区别 (Source Code vs Object Code – Difference between Source Code and Object Code)

Source Code Object Code
Created by the programmer. Created by the Compiler.
Text rich document. Binary digits make up the Object Code.
Human Readable. Machine Readable.
Can be changed over time. Needs to compile the Source Code each time a change is to be made.
Not system specific. System specific.
Serves as input to the compiler. It is the output of the compiler.
Instructions written using English words and according to syntax of the language. Instructions encoded in Binary digits.
源代码 目标码
由程序员创建。 由编译器创建。
文本丰富的文档。 二进制数字组成目标代码。
人类可读。 机器可读。
可以随时间改变。 每次进行更改时都需要编译源代码。
不是系统特定的。 系统特定。
用作编译器的输入。 它是编译器的输出。
使用英文单词并根据语言语法编写的说明。 指令以二进制数字编码。

Comment below if you have queries regarding difference between source code and object code.

如果您对源代码和目标代码之间的差异有疑问,请在下面评论。

翻译自: https://www.thecrazyprogrammer.com/2018/05/source-code-and-object-code.html

源代码和目标代码之间的区别相关推荐

  1. 【编译和解释】【源代码和目标代码】【静态语言和脚本语言】

    [编译和解释] 基本概念 1.源代码: 2.目标代码: 3.如何把人类可以阅读的程序变成机器可以执行的目标代码 ①编译: ②解释: ③对比编译和解释: ④静态语言和脚本语言: 基本概念 1.源代码: ...

  2. 图像分类,图像识别,目标检测之间的区别

    1.图像分类:一种用于对图像中特定的对象类别进行分类或预测的技术,该技术的主要目的是准确识别图像中的特征.主要是将图中的各个物体进行分类,如:这个图像的内容是属于猫,还是狗. 如:我们常使用的MNIS ...

  3. 初识python——python的发展历程及python各个版本之间的区别,python的安装

    初识python--python的发展历程及python各个版本之间的区别,python的安装 什么是python python的起源 python主要发展历程 python各个版本之间的区别 如何选 ...

  4. SQL0332N 不支持从源代码页 XXXX 到目标代码页 XXXX

    2019独角兽企业重金招聘Python工程师标准>>> 最近一段时间经常有人问起我db2codepage相关的一个问题: 用户有多个数据库,服务器端数据库代码页CODEPAGE设置的 ...

  5. (转)Spring中Bean的命名问题(id和name区别)及ref和idref之间的区别

    Spring中Bean的命名 1.每个Bean可以有一个id属性,并可以根据该id在IoC容器中查找该Bean,该id属性值必须在IoC容器中唯一: 2.可以不指定id属性,只指定全限定类名,如: & ...

  6. Linux_linux常用工具---闲杂篇(除了vim, 还有哪些常用的牛逼的编辑器, 并能够横向对比编辑器之间的区别和优缺点.)

    vim自行查找资料, 自行配置插件. 借鉴别人的 " 显示相关 """"""""""&qu ...

  7. python3怎么使用pyrex_用户指南 - Cython 和 Pyrex 之间的区别 - 《Cython 3.0 中文文档》 - 书栈网 · BookStack...

    Cython 和 Pyrex 之间的区别 警告 Cython 和 Pyrex 都是移动目标.已经到了这一点,两个项目之间所有差异的明确列表将很难列出和跟踪,但希望这个高级列表能够了解存在的差异.应该注 ...

  8. 理解 CI 和 CD 之间的区别(翻译)

    博客搬迁至https://blog.wangjiegulu.com RSS订阅:https://blog.wangjiegulu.com/feed.xml 原文链接:https://blog.wang ...

  9. 在循环之前或循环中声明变量之间的区别?

    本文翻译自:Difference between declaring variables before or in loop? I have always wondered if, in genera ...

最新文章

  1. 谷歌跟oracle_谁赢得了Google VS Oracle? 开发人员赢了。
  2. 华为IoT平台NB编解码插件开发详细教程【上篇】
  3. Java利用jacob实现文档格式转换
  4. Android桌面组件开发之实时文件夹(Live_Folders)
  5. 配置 HTTP 与 DNS 功能
  6. javascript的bind方法
  7. c java 语法_java程序员要学的c语法
  8. delphi控件属性大全-详解-简介
  9. 逻辑斯蒂回归:家庭买私家车的概率
  10. 梦网云通讯平台单条短信发送接口single_send说明
  11. [转] Linux-2.6.32 NUMA架构之内存和调度
  12. 唐巧iOS博客好文列表
  13. 【敬伟ps教程】PS基础知识了解
  14. SVG排版公众号图文『实时计算日期差』模板代码
  15. VUE2版本引入Element UI
  16. C语言之不等式的写法,大于小于等于
  17. Ubuntu18.04 cuda安装
  18. 零基础学习Vue3(保姆级教学)
  19. Application生命周期
  20. “高调做事,高调做人”?----关于排名和排序

热门文章

  1. 因果模型一:因果模型入门综述
  2. java interface 函数_Java8 函数式接口(Functional Interface),有且仅有一个抽象方法...
  3. 2017usnews计算机科学,2017年USNews美国计算机CS专业研究生排名
  4. 笔记-编译原理-实验四-语义分析与中间代码生成
  5. 微信小程序导入其他字体会不会影响运行_微信小程序是否可以引用特殊字体
  6. 大数据开发·关于虚拟机Hadoop完全分布式集群搭建教程
  7. 【Ybt OJ】[数学基础 第2章] 质数与约数
  8. 10Gb每秒!SM4的单核“心”!海泰携手海量数据安全“闪”护
  9. C4D透视图设置背景图,实景合成小技巧。
  10. ArangoDB 多模型数据库概念