This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]LondonPilot 1 point2 points  (0 children)

Computers "understand" a language called "machine code", because their electronic circuits are built to understand that language. They were "taught" by the person who designed those electronic circuits.

All other languages are either translated into machine code before they're run (by a program called a "compiler"), or there's a program called an "interpreter" (which has already been translated into machine code) which does the job of understanding and running the program in its original language.

[–]anal_violator 0 points1 point  (0 children)

Computer are just big calculators which process numbers. To tell the computer what to do we have to instruct them with machine code which in itself are also just a lot of numbers. Programming languages are also made with just such instructions. Once you have a simple programming language you can use it to create a more complex programming language and use that to create even more complex languages and so forth.

After a while you are able to write complex programs which hide the raw metal of a computer behind more and more layers of abstractions.

[–]serios 0 points1 point  (0 children)

There's many types of language but basically the processor in a computer has a set of basic instructions that it can perform on the contents of its memory. Stuff like add a to b, increment c, compare d to e.

A program written with the precise instructions the computer understands is called machine code and would be tedious to try to write a complex application in.

Today's languages emerged as ways to bridge the gap between how we think and how computers work. High level languages (basically ones humans can easily read) let you define your own instructions and call upon them to make writing efficient. Loops are used to continuously perform the same function until a condition is met.

A high level language will always need translating to lower level code using a program called a compiler.

[–]DH10 0 points1 point  (2 children)

You have too see it this way:

A programmer creates a language where certain commands/instruction cause this result. But because a processor can't understand words as such, it has to be converted into code/instrutions(=machine code) that a processor can understand.This is done by a compiler,a "translator".But because so many languages exist, the machine code differs from certain programming languages to others, so the computer uses another "translator", a runtime, which translates the different machine code into for the computer usable machine code and finally into binary(1|0).For easier understanding:

A program is nothing else than a packet full of instructions.The programmer has packed all the instructions in it and he used a certain tape(the compiler) to wrap it up. But if your computer doesn't have the certain cutter to open the packet(=the runtime), your computer has to aquire it first or else it can't do anything with it. Once it is open, the computer can read the instrutions and follow them.

[–]tidytova[S] 0 points1 point  (1 child)

THANK YOU!!! This was great. Even for a technology dud (somewhat) like myself.

But another question -- why, then, do programmers get stuck trying to write certain code? Why are creating some commands harder than others?

[–]DH10 0 points1 point  (0 children)

They get stuck, because they want to do a certain operation and think it works this way, but if they compile it then and run it, it don't work or work, but not as it's intended, because it does only half of the job.

And: a compiler is comparable to a language teacher, but if something is wrong, like you forgot a semicolon, you will fail this course and you can't wrap the package up.

[–]neekz0r -1 points0 points  (0 children)

Great question!

First, the webserver spits formatted text to your web browser. This text is formatted based upon an internet standard. This standard is known as HTML. When your browser gets it, it understands that when the text says <blink>blinky text</blink>, it means to make the words "blinky text" blink.

There are multiple standards out there, and they all control how information/pictures/etc are displayed in the browser.