Ding's

Something about Programming Language



We all know that computer store things anddo calculations in binary. But how do we communicate with them? It's not easyfor us to make every sentence into a list of "0"s&"1"s though there’s acertain kind of rule. Do you know what is the meaning of "0001001101110101001"? I don't know either.

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.

We now use some kinds of high-levelprogramming language while programming such as C++ and Java. They are easy forus to understand. For computer, they still cannot understand what we mean by anorder like "i = 1". In fact, hardware on the motherboard can only understand(or we call it do as the commands tells) Assembly Language, which is really hardfor us to understand what those commands mean.

So when we have written ahigh-level-language program, there's a useful command in every IDE called "Compile".That means the computer translate the programming language into AssemblyLanguage using the compiler, and then another kind of compiler called AssembleCompiler translate the Assembly Language into "0"&"1" code which computer canactually understand because it simple means "on" & "off"or "high"& "low".



Here's what Wiki defines Assembly Language and it's just for reference.

An assembly language (or assembler language[1]) is a low-level programming language for a computer, or other programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture's machine code instructions. Each assembly language is specific to a particular computer architecture, in contrast to most high-level programming languages, which are generally portable across multiple architectures, but require interpreting or compiling.

Reference:

Wiki - https://en.wikipedia.org/wiki/Computer#Machine_code

Wiki - https://en.wikipedia.org/wiki/Programming%20Language

Wiki - https://en.wikipedia.org/wiki/Assembly_language

and image from https://www.tuicool.com/articles/3m2MNvE

评论