0% found this document useful (0 votes)
6 views2 pages

Programming Overview

Programming is the process of instructing computers to perform tasks using programming languages, which are more understandable for humans. These languages are ultimately translated into binary code, the only language computers can understand, through compilers or interpreters. Regardless of the programming language used, the essential process remains the same: writing instructions, translating them to binary, and executing them on the computer.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Programming Overview

Programming is the process of instructing computers to perform tasks using programming languages, which are more understandable for humans. These languages are ultimately translated into binary code, the only language computers can understand, through compilers or interpreters. Regardless of the programming language used, the essential process remains the same: writing instructions, translating them to binary, and executing them on the computer.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

What is Programming?

Programming – telling the computer what to do.

Computers were developed to create digital stuff – photos, videos, video games, apps, software, etc.

Computers cannot create those things themselves; they need to be told what to do explicitly from scratch.

Because computers cannot understand the human language; they can understand only binary.

*Binary – language made of 0s and 1s completely. Computers work only on ON(1) and OFF(0) states. They cannot do
anything else except turning on and off.
Thus, programmers need programming languages to explain each instruction to the computer.

Programming languages are languages that humans can understand and write, so it will be easy to understand to explain
instructions to the computer.

There are high-level and low-level programming languages:

High-level – easier for humans to write and understand, but takes more time for computers to understand.

Low-level – easier for computers to understand and execute, but harder for humans to write.

There is also a machine-level language, also known as binary, which is the only language computers understand. No
matter what programming language – C++, Python, Java – and which level – High or Low – we use, all the programming
languages are translated into binary, 0s and 1s.

However, we don’t have to learn to code in binary because it is extremely inefficient and difficult; we should code in
either low or higher level languages, and our programs written in those languages are translated into binary.
Are you wondering how is it translated from programming language to binary? It is done using either a compiler or an
interpreter. (No need to know their differences now)

So, in short, here is the order:


1. We write our instructions in a programming language (C++, Python, Java, etc.)

2. The compiler/interpreter will translate this into binary (0s and 1s)
3. According to binary, or machine-level code, the computer will execute the instructions by switching ON and OFF.

This might sound hard, but at a current level, think this way:
Programming Language –> Compiler/Interpreter -> Machine-level code/Binary

So, there are many programming languages, thousands of: C++, C, C#, Java, JS, Python…
It does not matter which programming language we use as long as we can explain the instructions to the computer; the
same way no matter which human language we use (English, Russian, Persian, etc.), we can say the same meaning in any
language.

Example

Let’s say we want to create a basic calculator that performs +/-/÷/×. To do this, we have to explain the computer how the
basic operations work:
1. If user chooses the ‘+’ sign, add two numbers.

2. If user chooses the ‘-’ sign, subtract two numbers.


3. If user chooses the ‘×’ sign, multiple two numbers.
4. If user chooses the ‘÷’ sign, divide two numbers if the divisor is not 0.
Then, we need a programming language to write and explain the computer what to do!

After that, the compiler/interpreter will translate that language into binary.
And then, the computer will carry out the execution.

*Execute – to perform the instructions one by one in order.

You might also like