Machine Code

Machine code is the language of digital computers consisting of instructions expressed in a string of binary digits or bits read by the central processing unit (CPU). Since a computer does not understand the language humans speak, it can only respond directly to its own elemental or native language that looks like a sequence of zeros and ones.

Machine code vs. machine language

Also known as machine language, both terms refer to the numerical language used to control computers at their most basic level. Both can be written in different ways using a hex editor; an assembler; or a high-level programming language such as Java, C++, or Python.

How are machine codes used?

Machine code example.
An example of machine code for a program that writes zeros to memory. Source: University of Washington CSE.

Computer programs and applications provide executable instructions or convert high-level source code into a low-level sequence of binary or hexadecimal digits that the machine understands and responds to. The processor reads and interprets the machine language, which serves as the interface between hardware and software, to execute tasks and processes.

To build a software application, one needs to employ a language code and a language compiler like C++—a high-level programming language that must be translated at the hardware level. The source code is then compiled and executed to produce the intended outcome. Machine codes are used to instruct the system to execute the program.

Machine code’s instructions vary as different computers communicate and respond to different machine languages. For instance, the size of instruction sets may vary based on whether the computer is running in 32-bit or 64-bit mode. Or, an operating system (OS) like Windows, which is a host environment to computer programs, has system requirements different from Linux or macOS.

What are different types of machine code?

Machine code is executed directly by a computer’s CPU, so the hardware can perform its fundamental operations. However, machine code is specific to a given family of processors, with its own set of instructions and processes. 

  • ARM Original 32-bit: A reduced instruction set computer (RISC) machine code for processors configured for different environments.
  • DEC VAX: A 32-bit instruction set for VAX computers developed by Digital Equipment Corporation (DEC).
  • Zilog Z80: The instruction set of the 8-bit microprocessor created by Federico Faggin in 1974–1976.
  • x86: The 16-bit x86 was first used in Intel 8086, and then in 8088 that runs the early IBM PC.
  • AMD64 (x86-64): A 64-bit version of x86 launched in 1999 by Advanced Micro Devices (AMD).
  • IBM z/Architecture: A 64-bit complex instruction set computer (CISC) architecture used in IBM’s mainframe computers.
  • Other types include Sun Microsystems SPARC, MCST Elbrus 2000, UNIVAC, and Motorola 6880.

What is the difference between machine code and assembly language?

An assembly language directly corresponds to machine code instructions understandable by humans. A programmer uses mnemonic codes instead of numbers and symbolic names in referring to storage locations or registers. The assemblers can then convert symbolic addresses into absolute addresses. Machine code, however, uses numerical values and is lower in the computer languages hierarchy.

Keep reading to find out why one of the oldest programming languages in existence is one of the most in-demand at TechRepublic.


Kelvene Requiroso
Kelvene Requiroso
Kelvene Requiroso is a writer and an enthusiast interested in the interplay between technology and everyday life. He writes for TechnologyAdvice, Baseline, eSecurity Planet, and Webopedia. Also a lover of science fiction and fantasy, he publishes an ongoing web novel series. He has previously worked with non-profits and non-government organizations in Manila, Philippines.

Top Articles

List of Windows Operating System Versions & History [In Order]

The Windows operating system (Windows OS) refers to a family of operating systems developed by Microsoft Corporation. We look at the history of Windows...

How to Create a Website Shortcut on Your Desktop

Website Shortcut on Your Desktop reviewed by Web Webster   This Webopedia guide will show you how to create a website shortcut on your desktop using...

What are the Five Generations of Computers? (1st to 5th)

Reviewed by Web Webster Each generation of computer has brought significant advances in speed and power to computing tasks. Learn about each of the...

Hotmail [Outlook] Email Accounts

Launched in 1996, Hotmail was one of the first public webmail services that could be accessed from any web browser. At its peak in...

Crypt888 Ransomware

Crypt888, also known as Mircop, is ransomware that encrypts files on desktops, downloads,...

AutoLocky Ransomware

AutoLocky is ransomware written in the popular AutoIt scripting language. It uses strong...

Data Governance

Data governance is a term used to refer to the management of processes,...