How Computer Languages Work

Old No Comments on How Computer Languages Work 6

Computers are all around us. There are laptops, desktops, smart phones, tablets, smart watches, and even some smoke detectors. These are far from the paper punch card computers. The name for a computer problem, bug, might have originated when a moth crawled into a supercomputer, of the time, died, and caused a system failure. I am glad my computer is not like that.

At the lowest level, we have machine language, which is just a stream of ones and zeroes. This actually means something to the computer; it is something the computer can run and tells it what to do, but is worthless to any sane human. For anyone who wants to learn machine language, good luck; you will need it. Unfortunately, a computer can only understand machine language, that’s it. At least directly.

To solve this problem, something called an assembly language was devised. This is many times more readable by humans and much more closely resembles the programming of today, but still has distinct differences. Since the computer can only understand machine language, something called an assembler had to be created to turn the human readable code into a computer readable program. Think of it as a translator between the human and the computer.

It was later discovered that a higher language could be devised to make peoples’ lives easier. More and more complex tasks were needed to be done, so a more complicated language was needed. This language is called a compiler language. To turn that into machine language a compiler was needed. Compiled languages are still used today, some famous examples include C++ and Java (not JavaScript!).

Nevertheless, what about those languages that you do not need to compile, like Python? These are called interpreted languages and are turned into machine language on the spot, as the program runs, line by line.

Which is better, compiled or interpreted? The answer as Eli, has said again and again, “It depends on what you are doing”. Sometimes, compiled is better, sometimes interpreted. But, if you want to learn Java, you do not have much of a choice, because Java is compiled and only compiled.


Related Articles

Leave a comment

Back to Top