answersLogoWhite

0


Best Answer

Machine language is a stream of bytes interpreted by the CPU to perform operations on the computer. Reading machine language directly requires knowledge of or access to a list of "opcodes" (the numeric value associated with each instruction) in the program. Assembly language is a human-readable translation of machine language with additional features such as mapping of symbols to actual memory addresses or registers. People who use assembly language ultimately also become proficient in understanding machine language.

For example, in the x86 architecture, this machine language:

  • B8 05 00
is represented in assembly language as:
  • mov ax, 5
It is clear for someone who understands the assembly language that the instruction will move the immediate value "5" into the register "ax."
User Avatar

Wiki User

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

Wiki User

13y ago

Machine language is binary: 00100011110101110110111011. Humans can read this code, but it is tedious and painfully slow for most humans to do so.

Assembly language is a mnemonic language: it translates directly into machine code, but is easier on the eyes. The above machine language might translate into a more readable:

mov r1,3412

mov r2,2231

add r2,r1

push r2

"mov r1,3412" is far easier to read than a string of 1s and 0s that the computer sees. Of course, like any language, you still have to understand the code, and there is a lot more documentation to work with assembly as opposed to high level languages.

The advantage is that assembly is easier to read and write for humans than pure machine code.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is assembly language. Give its advantages over machine language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are high and low language give example?

Low-level languages, primarily assembly languages, are those with very little abstraction between the source code and the resultant machine code. They are generally machine-dependent languages; that is, they are non-portable between machine types. Each machine type has its own variant of assembly language and requires its own assembler. High-level languages have a high degree of abstraction between the source code and the resultant machine code. As such, they are generally machine-independent; the same source can be compiled or interpreted upon any machine with a suitable compiler or interpreter. C, C++ and Java are typical examples of high level languages.


Is user level language and high level language same?

Yes. User-level language is a high-level language because it requires a high degree of abstraction between the language and the machine code emitted by the language. Even a graphical user interface (GUI) can be considered a high-level language because it (can) allow users to indirectly interact with the machine's low-level facilities. Conversely, machine-level languages are low-level languages because there is little to no abstraction between the language and the resultant machine code. Note that the only language actually understood by the machine is its own native machine code (every machine type has its own variant of machine code). Both high-level and low-level languages allow users to create machine code. Low-level languages give the programmer (the user) near absolute control over the machine whereas high-level languages tend to limit the amount of control. There is no real distinction between the various high-level languages and the amount of low-level control the user has within them, it's merely a general term that implies there is a high degree of abstraction involved. Although the programmer has less control over the machine code, the machine code produced by high level language compilers can be just as good if not better than hand-crafted assembly instructions. This is because modern compilers can analyse vast amounts of source code much more quickly than any human and can therefore produce more optimal code. Languages such as C++ are specifically designed such that programmers will very rarely need to resort to low-level code such as inline assembly.


What are the disadvantages of fifth generation of language?

The major disadvantage of fifth generation programming languages is that these languages won't be as good as sixth generation languages. It is also important to note that classification of programming languages in generations beyond the second generation is complete nonsense and nothing but a marketing hype; programming languages don't evolve in a linear succession, or one in the shape of a balanced tree, where each generation has common attributes and improvements over the previous generation.


What are the advantages of an assembly language in comparison with high level languages?

Assembly language is lower level language. it can under stand only (who knows the assembly)assembly language program developers. actually assembly language is the effect way to implement programes.


What are the difficulties in writing programs in machine language?

Machine language is error prone simply because it is so difficult to write programs using nothing more than binary notation. Every instruction, every register and every memory address has to be converted to binary. Just one bit out of place would render the code invalid. Trying to find one errant bit amongst many millions is no easy task. Of course we don't actually use binary (base-2) to write machine code. Any base that is itself a power of 2 will do. Binary is 2^1 while 2^2 is base-4, 2^3 is base-8 (octal) and 2^4 is base-16 (hexadecimal). The advantage of using these higher bases is that instead of entering machine code one bit at a time, we can enter a group of bits using just one symbol. If we divide binary data into groups of 2 bits, then there can be only 4 possible combinations (00, 01, 10 and 11). Base-4 only has 4 possible digits (0, 1, 2 and 3) so it is trivial to map each group of 2 bits to just one base-4 digit. If we divide binary data into groups of 3 bits then there would be 8 possible combinations, each of which can be represented by just one octal digit. And if we divide into groups of 4 bits we get 16 possible combinations each of which can be represented with just one hexadecimal digit. A byte is usually 8 bits long, so if one hexadecimal digit represents half a byte (a nybble) then two hexadecimal digits represent a full byte. Converting from hexadecimal to binary is so trivial that we can easily write a simple machine code program to perform the conversion for us. This reduces the chances of making errors during input by a factor of 4. However, reducing the chances of error doesn't eliminate errors. Programmer's are only human and if a programmer can make mistakes using a high-level language, then the odds of making a mistake in low-level machine code is greatly multiplied. No matter how much time you spend designing, one mistake is all it takes. And if a mistake is made, finding it is easier said than done. To reduce the chances of mistake even further, it is best to steer clear of machine code altogether and use assembly language. Assembly language is a symbolic language, so just as binary values can be symbolised through hexadecimal notation, operation codes can be symbolised through easy-to-remember mnemonics. That is, instead of having to remember that code 80 moves a memory address into a register and that 81 moves a register value to that memory address, we need only remember that MOV does both and will translate to the appropriate instruction according to the operands we provide. Assembly language also allows us to use any notion that is most convenient, including decimal, octal, hexadecimal or even binary itself. Every register has a unique identifier and we can also give static, global and constant data user-defined names, so we don't need to keep track of every memory address. We can also insert comments! Although assembly language is not machine code, the translation from assembly language to machine code is virtually 1:1, there is very little in the way of abstraction. We still won't eliminate programming errors, but at least we have a fighting chance of locating them and ultimately fixing them. Writing machine code programs in assembly is nonetheless a laborious process. So much so that machine code programmers often prefer to use high-level languages like C and C++ to do the bulk of the work to generate the assembly language which they can then tweak further by hand where necessary. However, C++ in particular produces such good machine code by itself that programmers rarely need to "bang the metal". Indeed, many of the optimisations utilised by the C++ compiler came from the tricks of the trade used by machine code programmers themselves. As a result, C++ can often produce machine code that surpasses anything that can be produced by hand -- but even when it can't, tweaking machine code is so much easier when you don't have to write every single bit from scratch.

Related questions

Which wii give High-level programming language from machine language?

You cannot convert machine code to high-level language. It's a one-way process. The best you can do is disassemble a machine code program, producing code similar to assembly language.


Give the advantage of assembly language?

If you want to write fast, efficient programs that use a very small amount of memory, assembly language is a good choice for you! ASM is faster than other languages because it compiles directly into machine code without any unnecessary instructions for the computer to run.


Can you give a game coded in assembly language?

yes,becuse it is a game


What is meant by c language any one explain clearly?

Computers are machines that are designed to handle basic instructions (such as moving memory addresses to and from registers). These instructions are sent to the machine in a simple binary sequence known as machine code, the native language of the computer. It is extremely difficult for a person to work purely in machine code, thus interface programs have been created that will take instructions and convert them into machine-executable programs. The simplest of these languages is known as Assembly Language, which replaces the instructions with a set of easily-remembered symbols, such as MOV and JMP. Assembly Language is a low-level language as there is very little abstraction between the language and the resulting machine code.C is a high-level programming language that references a library of Assembly Language instructions that allows a person to create highly-efficient machine code, akin to that of Assembly itself. It is highly-abstract, insofar as a single instruction in C will generate two or more Assembly instructions, however these Assembly instructions can be tweaked, if necessary, or the programmer can choose to include raw Assembly instructions within their C programs. In other words, it is a highly-flexible language.The C language evolved from B, which was itself a subset of BCPL (Basic Combined Programming Language). By the same token, C++ evolved from C (although it was originally called C with Classes). These names were chosen to give an indication of their inheritance. The letter C is the natural successor to the letter B, while C++ is a play on words using C-style code, whereby C++ means C=C+1, which literally means the successor to C.


What factor must be increased to give a machine a mechanical advantages greater than 1?

output force


What are the advantages and disadvantages of basic language?

Basic languages of advantage and disadvantage please give the answer please


What are the Disadvantages and advantages of vending machines?

the machine can take your money and not give what you asked for back, hope this helps x


What are high and low language give example?

Low-level languages, primarily assembly languages, are those with very little abstraction between the source code and the resultant machine code. They are generally machine-dependent languages; that is, they are non-portable between machine types. Each machine type has its own variant of assembly language and requires its own assembler. High-level languages have a high degree of abstraction between the source code and the resultant machine code. As such, they are generally machine-independent; the same source can be compiled or interpreted upon any machine with a suitable compiler or interpreter. C, C++ and Java are typical examples of high level languages.


Is user level language and high level language same?

Yes. User-level language is a high-level language because it requires a high degree of abstraction between the language and the machine code emitted by the language. Even a graphical user interface (GUI) can be considered a high-level language because it (can) allow users to indirectly interact with the machine's low-level facilities. Conversely, machine-level languages are low-level languages because there is little to no abstraction between the language and the resultant machine code. Note that the only language actually understood by the machine is its own native machine code (every machine type has its own variant of machine code). Both high-level and low-level languages allow users to create machine code. Low-level languages give the programmer (the user) near absolute control over the machine whereas high-level languages tend to limit the amount of control. There is no real distinction between the various high-level languages and the amount of low-level control the user has within them, it's merely a general term that implies there is a high degree of abstraction involved. Although the programmer has less control over the machine code, the machine code produced by high level language compilers can be just as good if not better than hand-crafted assembly instructions. This is because modern compilers can analyse vast amounts of source code much more quickly than any human and can therefore produce more optimal code. Languages such as C++ are specifically designed such that programmers will very rarely need to resort to low-level code such as inline assembly.


What are advantages of giving a scientific name to an organism in Latin?

No advantage to Latin as it is a dead language, but to give organisms a agreed on name in a similar language has the advantage of everybody talking about the same organism.


Give the Advantages and disadvantages of a centralized registry?

give the advantages and dis advantages of a centralized registry?


Can you give me a sentence for the word assembly?

i do not like the Assembly. The assembly keeps us safe.