Search code examples
cprogramming-languageslow-level

How "low" does C go as a "low-level" language?


We often hear that C is a low-level language, but how low does it go? The lowest level I am aware of is memory management using pointers. Are there further levels I have yet to discover? What does "close to the hardware" mean? How "close to the hardware" is C?


Solution

  • Use the standard terminology. Higher level languages and Lower level languages.

    High level languages are designed for the ease of the person writing the language.

    Lower level languages are designed for the ease of the computer running the language.

    C is just a step up from assembly language, which is practically a human translation of machine code. It doesn't get any lower than machine code, but people don't read hexadecimal very well, so assembly is considered the lowest level programming language.

    Most C operations can be translated into less than ten machine instructions. Some can be translated into a single machine instruction (depending on many circumstances). By comparison, many high-level languages might require dozens to thousands of machine instructions to implement a particular operation.

    The "level" of a language is mostly an abstract concept. It is not useful for much except comparing one language to another in the context of trying to understand if you will have to write more source code in one or another, or if you will have to know more about the machine's architecture in one language as compared to another.