Introduction

Programming Language#

Language is a structured system of communication used by the humans. If two people want to have a conversation but they both should know the same language to understand each others statements. In the same way if we want to communicate or instruct the computer then computer should understand what we are saying(ex: English) at the same time we need to understand what computer is saying(Binary 0 & 1).

A language using which we can instruct the computer to perform some task (computation, algorithm etc.) is called a Programming language. It acts as a language in which we could easily express our thoughts to the machine. Like natural languages, programming language has a fixed set of rules (called grammar or semantics) according to which programs (source code) could be written in it.

This programs are then converted into a language which machine can understand (binary language) and this conversion will be done by the special software called compiler or interpreter. Every programming language has its own compiler or interpreter.

Once a program is compiled then it will generate the object file. Linker will link all the required files/modules to the generated object file to create a executable which computer can run.

Compiler/Assemblers/Interpreter are nothing but the translators which will translate the source code (High-level language) into machine code (Executable).

AST (Abstract Syntax Tree) is a graph/tree representation of source code primarily used by compilers to read code and generate the target binaries.

Types of Programming languages#

  • Low Level Language: It is the only language which can be understood by the computer. ex: Binary Language
  • Middle-level language: It is a computer language in which the instructions are created using symbols such as letters, digits and special characters. ex: Assembly Language
    info

    Assemblers are used to convert the middle-level language to low-level language

  • High-level language: It is a computer language which can be understood by the users. The high-level language is very similar to human languages and has a set of grammar rules that are used to make instructions more easily. ex: C, C++, Python, Java etc.
    info

    Compilers or Interpreters are used to convert High-level Languages.

Number system#

The technique to represent and work with numbers is called number system

DecimalBinaryOctalHexaDecimal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

Further reading#

Last updated on by Rashik Ansar