How are instructions converted to machine language?

1 answer

Answer

1162906

2026-07-16 22:10

+ Follow

Java
Java

Compilers or interpreters translate high-level code to machine language. Interpreted languages require a runtime to perform the conversion when the high-level code is executed whereas compiled languages are typically compiled to native machine code which requires no further translation. However, some languages compile the high-level code to an intermediate code known as byte code which is then interpreted to produce the machine code. This is typically done to improve performance, because it is quicker to interpret byte code than it is to interpret high level code (primarily because the byte code is more compact). Also, the byte code need only be compiled once but can be execute on any machine with a suitable interpreter. Java is a typical example of this (compiled Java byte code can be interpreted by the Java virtual machine on any physical machine). While this greatly improves performance and portability, the need for a runtime means the language is not suitable for general purpose programming (such as operating system kernels, device drivers, subsystems and so on), it can only be used to develop applications software. Despite the improved performance, compiled native machine code programs will always perform better than interpreted byte code. And although native machine code programs are not portable (they are machine-specific), the high-level source can be portable, it simply needs to be recompiled.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.