language-icon Old Web
English
Sign In

Low-level programming language

A low-level programming language is a programming language that provides little or no abstraction from a computer's instruction set architecture—commands or functions in the language map closely to processor instructions. Generally, this refers to either machine code or assembly language. The word 'low' refers to the small or nonexistent amount of abstraction between the language and machine language; because of this, low-level languages are sometimes described as being 'close to the hardware'. Programs written in low-level languages tend to be relatively non-portable. A low-level programming language is a programming language that provides little or no abstraction from a computer's instruction set architecture—commands or functions in the language map closely to processor instructions. Generally, this refers to either machine code or assembly language. The word 'low' refers to the small or nonexistent amount of abstraction between the language and machine language; because of this, low-level languages are sometimes described as being 'close to the hardware'. Programs written in low-level languages tend to be relatively non-portable. Low-level languages can convert to machine code without a compiler or interpreter – second-generation programming languages use a simpler processor called an assembler – and the resulting code runs directly on the processor. A program written in a low-level language can be made to run very quickly, with a small memory footprint. An equivalent program in a high-level language can be less efficient and use more memory. Low-level languages are simple, but considered difficult to use, due to numerous technical details that the programmer must remember. By comparison, a high-level programming language isolates execution semantics of a computer architecture from the specification of the program, which simplifies development. Low-level programming languages are sometimes divided into two categories: first generation and second generation. Machine code is the only language a computer can process directly without a previous transformation. Currently, programmers almost never write programs directly in machine code, because it requires attention to numerous details that a high-level language handles automatically. Furthermore it requires memorizing or looking up numerical codes for every instruction, and is extremely difficult to modify. True machine code is a stream of raw, usually binary, data. A programmer coding in 'machine code' normally codes instructions and data in a more readable form such as decimal, octal, or hexadecimal which is translated to internal format by a program called a loader or toggled into the computer's memory from a front panel. Although few programs are written in machine language, programmers often become adept at reading it through working with core dumps or debugging from the front panel. Example: A function in hexadecimal representation of 32-bit x86 machine code to calculate the nth Fibonacci number: Second-generation languages provide one abstraction level on top of the machine code. In the early days of coding on computers like the TX-0 and PDP-1, the first thing MIT hackers did was write assemblers.Assembly language has little semantics or formal specification, being only a mapping of human-readable symbols, including symbolic addresses, to opcodes, addresses, numeric constants, strings and so on. Typically, one machine instruction is represented as one line of assembly code. Assemblers produce object files that can link with other object files or be loaded on their own. Most assemblers provide macros to generate common sequences of instructions.

[ "Programming domain", "First-generation programming language", "Fifth-generation programming language", "Variable Assembly Language", "Common Intermediate Language", "Free-form language", "Function prologue", "Greenspun's tenth rule" ]
Parent Topic
Child Topic
    No Parent Topic