I know that any compiler will convert human readable code to binary.
This binary code is a opcode which has instruction+operands in it.
I do not understand how this opcode is decoded at hardware level.
For example: If I have below line of code in C
a = 8;
Lets assume this is converted to assembly as below
mov a,#8h
Finally, the compiler has generated below opcode (I am not sure I have converted this opcode correctly)
74h 0xE0 8h
So my question is when we flash this code to flash of controller, how does the controller understand and perform only "a=8" and not a=b+c ?
I also wants to know how it differentiates between different peripherals like register,RAM ,counters or ports? I came across some c programs where we refer these peripherals with some address (0xE0 for acc ,0x80 Port0) , but how controller fetches/outputs to that particular peripheral or a register bit which was referred in our code.