This was one of the questions that pushed me into studying software development. How does the computer understands what Im writing?:
Theres a main brain inside the computer that only understands “low level” instructions. These instructions are very simple some allow you to move memory spaces or make arithmetic operations and some other actions. You can research MIPS32 and x86 to see more about this set of instructions.
So when we write code like this:
Console.log(“hello world” + anyVariable);
A compiler’s job is to traduce that line of code into something the main brain can understand using its set of instructions so the main brain can actually execute it. Usually one line can be traduced to many small instructions.
I built 2 compilers in college and that was the most fun Ive ever had in my life.
Latest Answers