This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How does CPU/MCU works

If we go down , in the end MCP/CPU/MPU is made up of millions of transistors.

When we write code like:

ADD A,B
MUL, A, R1

So how does it come to know which is first instruction & what's its address or which address to go.
Like at abstract level usually we say that when MCU first get turn on it checks at origin & then go to next instruction , fetch it & decode it & execute it & then fetch another & so on. 
But how it is working at transistor level. 
Like adder can be made by transistors & subtractor also. I don't understand how it actually works at core level & everything is synchronized, again at abstract level we says its clock. But how at core level millions of transistors are controlled by single clock?????

  • Your question is too generic and it is not msp430-specific. There's lot of information around, you just need to look for it. Good place to start:

    http://en.wikipedia.org/wiki/Microprocessor

    http://en.wikipedia.org/wiki/CPU_design

  • Aamir Ali said:
    But how it is working at transistor level. 
    Like adder can be made by transistors & subtractor also. I don't understand how it actually works at core level & everything is synchronized, again at abstract level we says its clock. But how at core level millions of transistors are controlled by single clock?????

    After all, you are nothing but a big heap of cells. How come that you can think and walk?

    You should break down the problem into smaller parts and start low.

    You know how a transistor works. Next step is to combine transistors to gates. Then combine gates into higher-level logic parts, Flipflops, latches, counters etc.
    Look for TTL/CMOS logic chips and how they are made. Especially the synchronous ones, as this answers your question about one clock controlling everything.

    At university, I once built a 4-bit CPU just with an EEPROM for the microcode, a ram (basically lots of D-Flipflops with address multiplexers), and about ten TTL chips (including a 4-bit ALU).
    The CPU was wired on a breadboard, had one register, did support simple math, and conditional jumping, and was running stable with 100kHz system clock.
    Instead of the Eprom, we could have used a diode matrix, but during development, the Eprom was much more convenient :)

**Attention** This is a public forum