Britannica Sources used in this answer

How does an assembler translate an assembly-language program?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

An assembler is a specialized computer program that automatically converts instructions written in assembly language into machine language.21

Because assembly language is a low-level programming language designed to be a symbolic equivalent of a specific computer's machine code, the translation process is relatively direct. The assembler performs the following functions:21

  • Mnemonic Conversion: It replaces short mnemonic codes (such as "add") with the corresponding numeric binary codes that the computer can execute directly.2
  • Symbolic Resolution: It maps names assigned to blocks of memory or data to their actual machine addresses within the computer architecture.2
  • Instruction Expansion: Some assemblers can simplify programming by converting a single symbolic entity into a sequence of multiple machine-level instructions.1

Since machine language varies by manufacturer, each specific architecture requires its own dedicated assembler to interpret its unique instruction set.21