Eli5: How did people teach the first code to machines before code existed?

781 views

Eli5: How did people teach the first code to machines before code existed?

In: Technology

5 Answers

Anonymous 0 Comments

Historically, although it may seem odd, “code” or algorithms existed prior to modern electronic computers. The concept behind coding came from mathematics and logic. In a sense, computers were designed around ideas already established in programming. Code existed before computers.

The raw form of computer instructions (commands) are simply binary numbers stored in a particular sequence. This is called “machine language” because a computer will take these numbers and ‘run’ the instruction these numbers represent. Much of it is very basic stuff like “get this data from this location”, “add the number stored here to the number stored there and put the result somewhere else”, “store this number in this location” etc etc.

It is possible to manually write programs with machine language as long as the writer translates the desired action into these numbers but this is laborious and error prone so only simple programs are feasible. This is the most basic form of programming.

The next form of electronic computer programming is called “assembly language”. Basically a program is written that converts simple human text into machine language – this is pretty much a one to one translation meaning “load register A” command is translated to “0010” or similar. This is one step above writing in machine language, a bit easier to read and debug, but still very very tedious.

From assembly, it is now feasible to write compilers for higher level languages. A compiler is another program but is designed to “translate” a specific language into machine code. These are the more familiar languages like BASIC, FORTRAN, C etc etc. These compilers are just sophisticated translators but only for one particular language.

You are viewing 1 out of 5 answers, click here to view all answers.