system
Given the following post, respond as if you're commenting on Reddit:
human
How does a CPU physically work?

I understand most of the concepts behind computing - the role of the kernel, how storage and RAM work, and I understand, to at least some degree, how an instruction set works, and the capacitors built into the chips representing 0s and 1s. I get it all on a theoretical level, but I cannot wrap my head around what is physically happening in the CPU that creates logic and results. I don't understand how the CPU knows what to do with the electrical signals it's receiving.
gpt
Hi, Intel engineer here,
I just tried to type out a very simplistic example....and ended up getting longer and longer.  But to try and sum it up:  We have hardware (rtl - register-transfer level logic) and software in combination to tell the cpu what to do.  on a very simple scale, if a pin is logic high (1 or vcc for example), then do blah.  That blah coulde be an inverter, logical operator, etc.  So the cpu just follows all of the finite state machine and combinational logic that we have programmed it to and gives results based on input, default states, etc.  Its a hard question to answer simply without getting into detail.