Thus the single assembly line ADD R1, R2, R3 becomes the 16‑bit machine instruction 0010 0001 0010 0011 (hexadecimal 2123).
Translation Process Overview
Read the assembly source line by line.
Identify the mnemonic (operation) and look up its opcode.
Encode each operand according to the instruction format (register number, address, immediate value).
Assemble the fields into a binary word of the required length.
Optionally convert the binary word to hexadecimal for easier viewing or storage.
Write the resulting machine code to the output object file.
Why Use Assembly Language?
Provides a clear, readable representation of machine instructions.
Allows programmers to control hardware resources precisely (e.g., registers, flags).
Facilitates debugging at the instruction level.
Essential for writing low‑level routines such as interrupt handlers, boot loaders, and performance‑critical code.
Summary
Assembly language serves as a symbolic bridge between human understanding and the binary machine code that a CPU executes. Each assembly instruction maps directly to a fixed‑length machine instruction consisting of an opcode and operand fields. The assembler performs a systematic translation, converting mnemonics and symbolic operands into binary (or hexadecimal) values that the processor can interpret. Mastery of this relationship is fundamental for low‑level programming, debugging, and understanding how high‑level code is ultimately executed by hardware.