articles:general:computing:languages

Computer Languages

1. What is a computer language?

Just as we need languages to communicate with each other, computers also need languages.

These computer languages are usually used by us, as humans to communicate with computers.

When we communicate, we provide a set of instructions to the computer which in turn processes these instructions and executes. Imagine the computer as a worker who will carry out whatever instruction that you provide it.

Instructions
by humans
Computer


These instructions are limited by the computer's capability and functions.

For example, If we ask a computer to calculate 1+1

Please calculate
1+1
Computer

The computer would be able to process it.

But given an instruction like this

Please eat this pizza Computer

The computer would not be able to do it as it only needs electricity :-)

2. How do we talk to computers

Now, we need to understand that computers don't actually understand English

Please calculate
1+1
Computer 8-O

The computer will not respond to you and you may become frustrated.

This is so, as computers speak only a certain type of language known as binary number language. This language consists of 2 alphabets which are 0 and 1. In the early days of when computers were first invented, we have to learn binary language in order to talk to computers.
So we need a computer programmer who will translate what we want into a language that only the computer can understand.

Please calculate
1+1
Programmer 01010000 01101100 01100101 01100001 01110011 01100101 00100000 01100011 01100001 01101100 01100011 01110101 01101100 01100001 01110100 01100101 00100000 00110001 00101011 00110001 Computer LOL

You can try yourself to translate any text to binary using this website here. https://www.convertbinary.com/text-to-binary/
The binary number shown in this article are just examples for you and are not necessarily the actual binary that would be required by the computer. The actual binary code that would be required by the computer may be more longer and would stretch maybe up to few pages long for a simple instruction such as addition of two numbers.

3. Who is a programmer?

A programmer is a person who translates from English language to a computer language.

As computers became more and more sophisticated, programmers couldn't use Binary number language all of the time.
So newer computer languages were invented to make it easier for programmers to talk to computers.
These computer languages consists of a built in translator which will take the instruction and convert it to Binary language.
One example of a computer language is called the C language

Please calculate
1+1
Programmer a=1+1;
printf(a);
C Translator 01100001 00111101 00110001 00101011 00110001 00111011 01110000 01110010 01101001 01101110 01110100 01100110 00101000 01100001 00101001 00111011 Computer LOL



The C language doesn't look like English language and it takes a long time to learn it. Just like any human language, a person can learn this language and needs to practise using it on a daily basis in order to be good at a particular language.

So that is why we need a computer programmer. A computer programmer will listen to our instructions and then translate it into a particular computer language.

As computers became widespread and are now found all around the world and also in space, many new computer languages were invented.

4. Which language is the best?

Every computer language has it's own advantages and disadvantages. It doesn't matter which language you use because eventually the instructions are converted to binary number language.

This may be comparable to human languages. We too use a variety of language and what is important would be our what we are talking about instead of which language we use.

Please calculate
1+1
Any computer language 01010000 01101100 01100101 01100001 01110011 01100101 00100000 01100011 01100001 01101100 01100011 01110101 01101100 01100001 01110100 01100101 00100000 00110001 00101011 00110001 Computer LOL



Certain languages may have certain advantages because it is much more easier for programmers to provide instructions for certain fields such as computer science, mathematics, engineering, database, electronics etc.



Here are some examples for the same instruction written in different computer languages.

Please calculate
1+1
C a=1+1;printf(a); 01010000 ...... Computer LOL
C++ a=1+1;cout«a; 01010000 ...... Computer LOL
PHP a=1+1;echo a; 01010000 ...... Computer LOL

5. The Output

Finally, when the computer understands our instructions, it would process it and provide an output.

Please calculate
1+1
Computer Output as
2

Check out the other articles here articles

  • Last modified: 2022/10/30 17:39