When we think of modern coding, we think of Python and Rust and Swift and Ruby and so on.
My question is more abstract. How exactly did computer scientists develop the original language used to tell a computer what to do and when to do it? How did they teach the computer to recognize that langauge?
Going even further than that, how did current languages get developed? Did they just rewrite the original computer code from scratch or are all modern computer languages designed to communicate with this baseline original code which all computers were programmed with?
In: Technology
The “original language” is designed by whoever makes the processor (or other computer chip). The chip has physical pins that attach to the circuit board. Some are inputs, they receive a signal, and some are outputs, they emit a signal. When the input pins receive a signal they do something based on how they are designed. A very basic operation might be to add two numbers. For this to happen the processor will receive 3 signals. First is the operation to perform (in this case add), next is the numbers to add. It will perform the operation and output the result on its output pins, which either the processor itself or some other chip can then use.
All of the pins and the commands the chip can respond to are documented by the chip maker. Anyone with this information and a little electrical engineering knowledge could then wire up the chip to do something.
But writing programs in this code, called machine code, is inconvenient because it’s usually much to basic on its own. To do things like draw a circle on the screen you need to write hundreds or even millions of machine code commands. Think of it like ordering a hamburger at a restaurant. You don’t tell the waiter all the individual steps to make to prepare a hamburger (unless you are nuts). The chef knows what a “hamburger” is and translates “make a hamburger” into the thousands of sub commands (slice tomato, put on bun, heat grill, etc) necessary. Fortunately there are people who do that for computers as well. They build languages on top of the machine code that make it easier to perform complex actions. And still more people build languages on top of those to make it easier to do various tasks.
Each language can be automatically translated into lower level languages until ultimately it’s just a list of machine code commands.
Latest Answers