I understand how the code is compiled to assembly, and that assembly is a 1:1 replacement with binary codes. Can somebody help me understand how binary is conne
You may find this link of interest: http://www.eskimo.com/~ddf/Theory/Micro_Fund/Commands/AssyLnge.html
In a short explanation, typically the application will be loaded to some area in memory and the processor will be given the start address, for the main or starting part.
A processor can do two things, it can manipulate data and move data, so it will use special parts on the microprocessor called registers in order to store values or location that it will need.
So, for an if statement, there is a command for whether two values are equal and where to go if they are not (branch if not equal). There will be some others, such as branch of equal or branch of greater than.
These will be in the assembly.
The commands are put into registers, with the appropriate arguments and it will be calculated on the next clock cycle.
This is very simplified, but to a large extent, what you see in assembly is what the microprocessor will see.
To go into more detail would probably be out of scope for StackOverflow.