Hubbry Logo
search
logo

Low-level programming language

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
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, memory or underlying physical hardware; commands or functions in the language are structurally similar to a processor's instructions. These languages provide the programmer with full control over program memory and the underlying machine code instructions. Because of the low level of abstraction (hence the term "low-level") between the language and machine language, low-level languages are sometimes described as being "close to the hardware".

Machine code, classified as a first-generation programming language, is data encoded and structured per the instruction set architecture of a CPU. The instructions imply operations such as moving values in and out of memory locations, Boolean logic, arithmetic, comparing values, and flow control (branching and jumping).

Programmers almost never program directly in machine code; instead, they use an assembly language or a higher-level programming language. Although few programs are written in machine languages, some programmers learn to read it through experience with core dumps and debugging.

An assembly language, classified as a second-generation programming language, provides a level of abstraction on top of machine code. A program written in assembly language is non-portable, due to being written and optimized for a particular architecture.

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, commonly called a mnemonic. 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.

In the early days of coding on computers like TX-0 and PDP-1, the first thing MIT hackers did was to write assemblers.

The C programming language, a third-generation programming language, is sometimes classified as high or low depending on what one means by high vs. low level. The syntax of C is inherently higher level than that of an assembly language since an assembly language is syntactically platform dependent whereas the C syntax is platform independent. C does support low-level programming – directly accessing computer hardware – but other languages, sometimes considered higher level than C, also can access hardware directly. With C, developers might need to handle relatively low-level aspects that other languages abstract (provide higher level support for) such as memory management and pointer arithmetic. But, C can encode abstractions that hide details such as hardware access, memory management and pointer arithmetic such that at least part of a C codebase might be as conceptually high-level as if constructed in any other language. Whether C is classified as high or low level language is contended, but it is higher level than assembly languages (especially syntactically) and is lower level than many other languages in some aspects.

Although C is not architecture independent, it can be used to write code that is cross-platform even though doing so can be technically challenging. An aspect of C that facilitates cross-platform development is the C standard library that provides “an interface to system-dependent objects that is itself relatively system independent”.

See all
User Avatar
No comments yet.