Alexa Metrics

How computer understands code?

Image showing a programmer is writing code on his laptop.

Can we teach a computer a specific programming language? This is a work in progress, but there is not yet a clear way of teaching a computer a language. What has been done is to program the computer to understand a language. The computer doesn’t actually learn the language; instead, it parses the language and does what the lines of code tell it to do.

To break it down further, the CPU is at the heart of the computer. It only understands something called machine code, which is a language consisting of ones and zeros. Instructions written in machine code will be executed directly by the CPU. These binary instructions are called op-codes or operation codes. They have been indexed by computer scientists in libraries that can be referenced.

One level up

Moving one level above machine code, we reach what is called the assembly language. Assembly allows you to write instructions written in a format that is understandable to humans. A compiler, which is a tool designed by programmers to translate assembly into machine code, is then used to convert the code so it can be understood by the CPU.

Higher levels

You can use the same method to translate higher-level programming languages like C, C++, and others into machine code. After assembly language comes languages that were invented to be similar to the English natural language. This makes those languages easier to learn and maintain and allows them to be used for collaboration purposes.

A compiler that resembles the assembly compiler was built for these languages. This compiler translates the higher-level languages to assembly, and then to machine code.

Other languages like Python, Perl, and TKL are called interpreted languages. Instead of being translated by a compiler, these languages are just read, instruction by instruction, by something called an interpreter.

If you want to try ordering the computer around, why not learn programming? Register today for free and join RoboGarden.

Importance of coding education programming languages Python Language



Do you want to learn coding in less time than possible and without any money, join us on the best platform ever on learning coding as a game for kids?

Canada Flag Privacy Policy Terms of Use
Got an invite