Programmers write instructions in various programming languages (such as C#), some directly understandable by computers and others requiring intermediate translation steps.
Any computer can directly understand only its own machine language, defined by its hardware architecture. Machine languages generally consist of numbers, ultimately reduced to 1s and 0s. Such languages are cumbersome for humans, who prefer words like “add” and “subtract” to indicate the operations to be performed, so the machine language numeric versions of these instructions were referred to as code. The term “code” has become more broadly used and now refers to the program instructions in all levels of language.
Assembly Languages and Assemblers
Machine language was simply too slow and tedious to work with. Instead, programmers began using English-like abbreviations to represent elementary operations. These abbreviations form the basis of assembly languages. Translator programs called assemblers convert assembly-language code to machine code quickly. Although assembly-language code is clearer to humans, it’s incomprehensible to computers until translated to machine language code.
High-Level Languages, Compilers and Interpreters To speed the programming process even further, high-level languages were developed in
which single statements could be written to accomplish substantial tasks. High-level languages, such as C#, Visual Basic, C++, C, Objective-C and Java, allow you to write instructions that look almost like everyday English and contain commonly used mathematical expressions. Translator programs called compilers convert high-level language code into machine language code.
The process of compiling a large high-level language program into machine language can take a considerable amount of computer time. Interpreter programs were developed to execute high-level language programs directly (without the need for compilation), although more slowly than compiled programs.