SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Linda Null ,julia Lobur
Chapter:
Marie An Introduction To A Simple Computer
Exercise:
Review Of Essential Terms And Concepts
Question:28 | ISBN:9780763704445 | Edition: 3

Question

28. How does a machine language differ from an assembly language? Is the conversion one-to-one (one assembly instruction equals one machine instruction)?

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

Machine language is series of bit patterns (that is the binary form) that are directly executed by a computer, whereas Assembly language is a low-level language that needs compiler and interpreter, which converts that language to machine language. And then it could be understood by a computer.

Machine language is platform-dependent whereas Assembly is platform-independent. Platforms here referred to an operating system like Windows, Linux, etc.

Machine language is not human readable; however, you can interpret it by numbers by hand. Every instruction known as an “op-code” is a number that might be followed in memory by “operands”
Assembly language is a set of instructions which can be read by human and can be understood as well. Here instead to remember the op-codes, “mnemonics” are used. It is however less readable than high-level language.

Machine language can be extremely time-consuming, tedious, and error-prone. However, that’s not the case with Assembly language as mnemonic names and symbols are available here. It is much less tedious and error-prone than the binary machine code.
The problem with both these languages is Program written for one CPU architecture will not work for another CPU architecture. Every new CPU architecture will have a new set of instructions and hence to run the same program for other CPU, one will have to write a program from scratch if its machine language. If its assembly language, accessing memory instruction will change, hence significant modifications will be a requirement.

Is the conversion one-to-one (one assembly instruction equals one machine instruction)?

The answer is obviously Yes. As,

1-1: One assembly language instruction corresponds to one machine language instruction.

 

1 0

Discussions

Post the discussion to improve the above solution.