📜  汇编语言和机器语言的区别

📅  最后修改于: 2021-09-10 03:09:24             🧑  作者: Mango

机器语言是低级编程语言。它只能用 0 和 1 表示。早些时候,当我们必须在计算机屏幕上创建图片或显示数据时,仅使用二进制数字(0 和 1)来绘制是非常困难的。例如:在计算机系统中写 120 其表示是 1111000。所以它很难学。为了克服这个问题,发明了汇编语言。

汇编语言是多于低级而少于高级语言(如 C、C++、 Java、 Python等)。所以它是一种中介语言。汇编语言使用数字、符号和缩写代替 0 和 1。例如:对于加法、减法和乘法,它使用诸如 Add、Sub 和 Mul 等符号。

汇编语言和机器语言

汇编语言和机器语言的区别。

Assembly Language Machine Language
Assembly language is only comprehensible to human beings not to computers. Machine language is only comprehensible to computers.
In assembly language data can be represented with the help of mnemonics such as Mov, Add, Sub, End, etc. In machine language data only represented with the help of binary format(0s and 1s), hexadecimal,and octadecimal.
Assembly language is easy to understand by human being as compared to machine language. Machine language is very difficult to understand by the human beings.
Modifications and error fixing can be done in assembly language. Modifications and error fixing cannot be done in machine language.
It is easy to memorize the assembly language because some alphabets and mnemonics are used. Machine language is very difficult to memorize due to the use of binary format (0s and 1s).
Execution is slow as compared to machine language. Execution is fast in machine language because all data is already present in binary format.
Assembler is used as a translator to convert mnemonics into machine-understandable form. There is no need of a translator.The machine language is already in machine-understandable form.
Assembly language is the machine-dependent and it is not portable. Machine language is hardware dependent.

参考:

  1. https://en.wikipedia.org/wiki/Assembly_language
  2. https://en.wikipedia.org/wiki/Machine_code