3.4.4 - High-level, assembly and machine languages
Compare programming language levels, distinguish assembly from machine code, and explain why a developer might choose a language closer to the hardware or closer to a human problem.
High-level and low-level languages
A programming language's level describes how far its instructions are removed from the processor's individual operations.
High-level languages, including Python, C# and VB.NET, express tasks using abstractions such as variables, conditions and subroutines. A single high-level operation may require many processor instructions. The developer can focus on the problem without manually managing every hardware operation.
Low-level languages closely reflect the processor and its hardware. Machine code and assembly language are low-level. Their instructions specify simpler processor operations, so the developer must account for more hardware detail.
Most programs are written in high-level languages because they are easier for people to read, write, debug and maintain. Libraries and structured language features reduce development effort. The source can often be adapted or translated for different systems, although actual portability still depends on libraries and platform-specific features.
“High-level” does not mean a program is automatically correct or expensive. “Low-level” does not mean less capable. These labels describe the relationship between the language and the hardware, not a developer's skill.
Machine code and assembly
The processor executes machine code, while assembly supplies human-readable names for individual machine operations.
Machine code expresses instructions in binary. A processor or processor family has a particular instruction set: the operations and binary instruction formats it understands. Machine code intended for one processor family is not automatically executable on an unrelated processor family.
Assembly language uses mnemonics, short names for operations, and symbols instead of requiring the programmer to write every binary instruction pattern. It still depends on the processor's instruction set. In the specification's model, each assembly instruction corresponds to one machine-code instruction; an assembler performs that translation.
This one-to-one correspondence differs from a high-level statement that may become several machine instructions. Assembly must be translated before the processor can execute it. The CPU does not execute an English mnemonic merely because a human finds it readable.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account