How was the first compiler written?

Viewed 53696

I heard about the chicken and the egg and bootstrapping. I have a few questions.

What wrote the first compiler that converted something into binary instructions?

Is assembly compiled or translated into binary instructions?

...I'd find it hard to believe they wrote a compiler in binary.

6 Answers

Eggs long preceded chickens. The answer to most "chicken and the egg" problems is the same: evolution. Some people have trouble believing in biological evolution too, but disbelief is not an argument (google argumentum ad ignorantiam).

To directly answer your question: the first compiler was written (by a human) in an assembly language -- a program called an assembler would translate assembly language into binary; this is a much simpler process than compilation because assembly language is just a symbolic form of machine language that uses opcode names instead of numbers, represents addresses with symbols, and so on. Many subsequent compilers were written in an assembly language as well. But the first C compiler was a modified B compiler, which was written in B. The first B compiler was written in TMG. The TMG compiler used to compile that B compiler was written in PDP-7 assembly language.

Related