← homeProgramming (Програмування)

What is native machine code?

What is native machine code? How does it work and what is it used for?

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 to execute (for instance, Java bytecode on the JVM), while native machine code does not require an additional execution environment.
An interesting visual example from the English Wikipedia:
The Game Boy runs software (a game) obtained through a cartridge that contains (native) code that is 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.

🔥 More posts

All posts
ZOMBIE in Ruby. What is it?
Programming (Програмування)May 3, '24 12:41

ZOMBIE in Ruby. What is it?

ZOMBIE in Ruby. What is it? What is this term used for in the Ruby repository?

What is technical debt in IT projects?
Programming (Програмування)May 13, '24 06:17

What is technical debt in IT projects?

What is technical debt in IT projects? Where does technical debt come from and what does it affec...

What is "scope creep"?
Terms (Терміни)May 13, '24 07:20

What is "scope creep"?

What is "scope creep"? Causes, consequences, examples.

What does "Native" mean?
Terms (Терміни)May 22, '24 07:01

What does "Native" mean?

What is native? Learn about the meaning of the term "native" with examples of its use in various ...