Table of contentsClick link to navigate to the desired location
This content has been automatically translated from Ukrainian.
Native machine code is a type of software code that is executed directly by a computer's processor. It is specific to each type of processor, as it depends on its architecture. This code consists of sequences of binary instructions, each dictating to the processor which operations to perform.
Main characteristics of native machine code
- Native machine code is executed by the processor directly, without additional stages of interpretation or compilation. This ensures high execution speed, as the code is optimized for a specific type of processor.
- The code is written or compiled for a specific processor architecture (for example, x86, ARM). This means that a program compiled for one architecture will not work on another without recompilation.
- For example, bytecode requires a virtual machine for execution (for example, Java bytecode on the JVM), while native machine code does not require an additional execution environment.
An interesting illustrative example from the English Wikipedia:
The Game Boy runs software (a game) obtained through a cartridge that contains the (native) code being executed. The only way to run this code on another processor (not on the original Game Boy processor that interprets the native code) is to use an emulator that simulates a real Game Boy. Running the emulator is an additional load on the operating system, which can affect the speed of the program.
This post doesn't have any additions from the author yet.