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

Posted on 2008-11-11
Last Modified: 2013-12-13
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.
Question by:F-J-K
    LVL 1

    Author Comment

    No one knows?
    LVL 4

    Accepted Solution

    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 :(

    LVL 1

    Author Closing Comment

    well done!

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now