WhatIs.com

machine code (machine language)

By TechTarget Contributor

Machine code, also known as machine language, is the elemental language of computers. It is read by the computer's central processing unit (CPU), is composed of digital binary numbers and looks like a very long sequence of zeros and ones. Ultimately, the source code of every human-readable programming language must be translated to machine language by a compiler or an interpreter, because binary code is the only language that computer hardware can understand.

Each CPU has its own specific machine language. The processor reads and handles instructions, which tell the CPU to perform a simple task. Instructions are comprised of a certain number of bits. If instructions for a particular processor are 8 bits, for example, the first 4 bits part (the opcode) tells the computer what to do and the second 4 bits (the operand) tells the computer what data to use.

01001000 01100101 01101100 01101100 01101111 00100001

Depending upon the processor, a computer's instruction sets may all be the same length, or they may vary, depending upon the specific instruction. The architecture of the particular processor determines how instructions are patterned. The execution of instructions is controlled by firmware or the CPU's internal wiring.

Human programmers rarely, if ever, deal directly with machine code anymore. If developers are debugging a program at a low level, they might use a printout that shows the program in its machine code form. The printout, which is called a dump, is very difficult and to work with a tool called a dump. Utility programs used to create dumps will often represent four bits by a single hexadecimal to make the machine code easier to read and contain other information about the computer's operation, such as the address of the instruction that was being executed at the time the dump was initiated.

22 Feb 2018

All Rights Reserved, Copyright 1999 - 2024, TechTarget | Read our Privacy Statement