How Was First Compiler Invented? How Machine Could Read First Compiler? What Was There Before Compilers?

I'm wondering, if compilers are written in human readable way, then how come the machine could read the compiler?

If machine could read the compiler - which is by itself is not a machine language, why don't the machine just read the high level programming language directly? As it is known, machine only can understand in binaries. If the compiler was written in binaries, in such a way that these binaries can fetch the high level language and translate it back to machine language, it would make more sense, but compilers are not in binaries, so there should be something else.

If a language needs a compiler, then how come a compiler is invented, since this compiler is a language and it will a compiler, see its confusing now!

I'm sure there are experts here who knows the answer. Waiting your reply.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

F-J-KAuthor Commented:
No one knows?
Do you know the legend of the German  baron and bootstrapping? According to legend, he was drowning in the sea, and pulled himself out of the water by pulling his bootstraps :)
Look it up ;)

The thing is, first computers ware programmed in binary, then assembly was invented to. So the job of the compiler was just table mapping values. It was a program written in binary code so when it saw something like "ADD $00000101 #R1" it translated the mnemonic ADD to some code like 001010010 and the computer was sending this information to electronic part for addition function, flowing the binary value 5, and register 1, where code $ was direct input and # was symbol for memory register 1. In this respect, the calculated sum will be stored in register R1. (the values are just an example, hence different microprocessors have specific registers and accumulators and therefore assembly mnemonics)
So you see, it's just mapping values, the next step is some language like C, know you can write in assembly how to translate C code in actual assembly commands. No matter which generation language you have, it allways ends up in assembly, and eventualy in binary code.
I suggest you to write a simple program in C++, just a hello world. - And then find some dissasembiling program on the Internet. - this is the actual way that crackers crack software :(


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
F-J-KAuthor Commented:
well done!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.