Fool's computer cleverness

in #computer6 years ago

Statutory warning: This is not for computer users.

In the 1st phase, I showed how to make the computer instruction through 0 (zero) and 1 (one). It is a big complexion, is not it? In such a way, the common man like us is not a common, but what do you say? But the beginning was the same way. That's why it was not even in our reach. Good luck, now it does not have to write thousand and lakhs 0 and 1. Let's look at how to write it today.

Say a very real thing. The computer still does not understand anything other than Instructions 0 and 1. This is his language. We do not understand Bengali other than Bangla languages ​​like Bangla (not translating English or any other language in Bangla before, then understand), so the computer does not understand anything other than its language. In different ways, he has converted his own language before giving an instruction. The computer language of this language is - machine language [wiki].

But machine working in machine language is the job of the machine. Boring and mechanical. What do we like to talk about these numbers? We're talking with words, not by number. Well, if it were a machine that was converting our words into a computer number, would not it have been better? Such conversators are actually there. Its name is compiler [wiki]

Let's look at the compiler's work a little. Remember our simple computer lessons in the last episode? The addition of 15 and 20 yoga instructions - 0001 0015 0020 (before binary conversion) Here the first 0001 is the function of Yoga (Ketabi Name: Opcod [Wiki]), and the next 0015 and 002 are two pairs of yoga. I would say to write this instruction in our familiar English language -

ADD 15,20

is not it? The compiler can translate this English language instruction into machine language in the following rules:

  1. First convert the ADD to the joining force (0001).
  2. After that, the two sides of the commencement will be converted into 4 digit number (0015, 0020)
  3. Then three numbers together - 000100150020. That's right! Have become

You-I would like to write ADD 15,20 rather than writing 001000150020, do not you? The main reason for this - we can remember the words more easily than numbers. In this way, you can create another language by putting some familiar words in place of the number of machine languages, which the compiler can translate into machine language again. This new language is called Assembly Language [Wiki]. It is very close to the main machine language, but it is also understandable for the people.image.png
See how the Instructions for showing results in addition, subtraction, multiplication, division, and monitor can be done in assembly language -

Operation: Machine Language Instruction: Assembly Language Instruction
15 + 20: 0001 0015 0020 ADD 15, 20
100-33: 0002 0100 0033 SUBTRACT 100, 33
45x29: 0003 0045 0029 MULTIPLY 45, 29
60 ÷ 4 0004 0060 0004 DIVIDE 60, 4
Showing results: 0005 0000 0000 PRINT
(Note: Instructions in this writing are sampled, exactly the machine / assembly language is not written, but examples are near the main language.)

Listen to a bad guy this time. She has translated SUM, subtracted DEDUCT without translating Yoga. Writing instead of COR and AND His writings are like these Instructions

SUM 15 AND 20
DEDUCT 100 AND 30

what will happen now? Our compiled compiler does not understand SUM / DEDUCT, it can not translate. Again, the two sides of the comma separates the two, and neither the sides of it Actually, the ones who can not write here happy. There are some rules in each language, its own vocabulary. Everyone has to follow these rules. These rules of the computer's language are its syntax [wiki]. Syntax should be instructed properly. Like our grammar in our normal language, some grammatical words are not meant to be put together, but grammar has to be accepted.

Keeping the syntax properly easier than the machine language in the assembly language, it is much easier than our normal language, though it is far away from the language. Low-level language [Wiki] is such a language spoken These languages ​​can be different for different types of computers (eg INTEL processors, AMD processors, etc.). There are other types of languages ​​which are similar to all types of computers and are closer to our normal language. These are called high-level languages ​​[Wiki]. In the programming language [wiki] we basically understand this high-level language. C, C ++, Java, C #, Pascal, Fortran, HTML, JavaScript are among the most popular and popular high-level languages. If you want to know more names you can see here.

Finally what happened? The programs we write using high-level programming languages, the compiler translates it first into the lower-level language and then converts to machine language. Sometimes the machine can convert directly to the machine language, but eventually comes to the machine language. Only then can the computer do its job. Because that's his mother tongue!

Different context: Now Google Translator can translate many languages. Even started to translate complex languages ​​like Bangla language. That is, if Google translators could translate our natural language (such as English) into a programming language (eg C)!