How is machine code handled by the microprocessor? [closed]

And no I don't mean "How do you write a program for a processor".

What I want to know is how does a processor interpret some aribtrary instruction, say 100001 as ADD r1,r2 etc.? What do the individual bits in the bit sequence mean and how does the bit sequence tell the processor what to do?

Is it similar to how an FPGA works? Is the processor logic just a bunch of gates?

• Just a bunch of gates, yeah, that's what logic is. Read about opcodes and instruction sets. Feb 5 '14 at 0:00
• possible duplicate of How were the first microprocessors programmed? Feb 5 '14 at 1:17