I am a software developer (using high level languages like .NET,C,C++ etc) trying to understand how computers work at a lower level.

I am familar with this diagram:

I am trying to gain a high level insight into how the diagram in the link maps to a circuit diagram like this:

For example, have a look at the assembly language statement:

ADD 1,2

I am trying to understand how the processor produces '3' as the output. I realise that this question may be difficult to answer in simple terms. If it is, then a link would help, perhaps to a book.

  • \$\begingroup\$ With reference to the first diagram you posted, the details you need of the actual arithmetic are all hidden in the big block labelled "ALU" : every other block on that diagram is just there to get 1,2 and "add" into the ALU and the result out again. Knowing that, you can start to read how the ALU works, if that was what you were asking.. \$\endgroup\$
    – user16324
    Commented Jan 6, 2013 at 11:52
  • 5
    \$\begingroup\$ Your first diagram maps to the Z80 CPU in the second diagram. \$\endgroup\$
    – starblue
    Commented Jan 7, 2013 at 13:48

4 Answers 4


The problem is that in order to understand how the computer gets to 1 + 2 = 3 you have to understand about 2 levels deeper than you've gone.

Roughly a computer is organized (in terms of fields of study) like this from highest level of abstraction to the most physical reality:

  1. Application Software
  2. Virtual Machine
  3. Operating System
  4. BIOS
  5. Embedded Systems
  6. IP Blocks (Sub-units/Peripherals)
  7. Logical Blocks
  8. Gate-Level
  9. Transistor Level
  10. Semicoductors
  11. Device Physics

To properly understand why the computer can produce 2+1 = 3, you must first decide what you are willing to accept "on faith" and what you will not believe until you internalize it. That piece of information will be at the level two below the thing you understand. So if you want to understand an adder circuit at the logical level you will need to understand the basics of "digital" transistors (specifically CMOS).

Using your earlier site as an example, consider this resource. It discusses the "Full Adder" -- the minimum completely general purpose circuit capable of addition/subtraction including carry-in and carry-out.

You will also need to understand how numbers are represented in 2's complement (the number system used in modern computers for integer arithmetic).

If you really want a world-class introductory course, I cannot recommend Professor Scott Wills at Georgia Tech highly enough. He passed away last year of cancer, but his course lives on. The Georgia Tech ECE2030 (introduction to computer engineering) class has its text book and exercises all online.

Good luck!

  • \$\begingroup\$ Thanks for this. +1. I am a .NET developer,although I have experience with C and C++. I understand that C# is compiled into Intermediary Language and the JIT compiler targets the computer architecture by compiling the IL code on the fly. I am trying to understand how a microcontroller can receive an operand and an opcode and produce an output. I am knowledgeable (GCSE level) about electronic components like: Transistors,Capacitors etc. \$\endgroup\$
    – w0051977
    Commented Jan 6, 2013 at 15:26
  • \$\begingroup\$ ...then I would start with "Switch Design" in the Readings and work forward in the lessons from there. \$\endgroup\$ Commented Jan 6, 2013 at 19:28
  • \$\begingroup\$ Your list of topics manages to throw in several which are irrelevant to the question, while skipping over those which are most relevant. \$\endgroup\$ Commented Aug 11, 2013 at 14:56
  • \$\begingroup\$ @Chris -- No it doesn't. \$\endgroup\$ Commented Aug 11, 2013 at 17:55

I had to learn the same in university, and we used the book Computer Organization and Design which was very detailed (but maybe it is too detailed for your needs).

Patterson and Hennesy used some "simple" MIPS processor and showed the whole function of the CPU with some sample code in Assembler.

Generally, I think it would be a great idea to take some "simple" processor (Arduino or so) and try to understand there the function, because the differences from that to the more complex are more in how big the implemented instruction codes are.

P.S. Maybe the elementary-microprocessor from Google Code would be helpful. It is a microprocessor simulated in Java.


The free book How Computers Work - Processor and Main Memory by Roger Young will answer your question, it uses relays instead of transistors for better understanding.

  • 2
    \$\begingroup\$ While that book does look useful please edit the answer to include the full title and author information. That way if the link ever changes it may still be possible to track it down in the future. \$\endgroup\$
    – PeterJ
    Commented Aug 11, 2013 at 13:26
  • \$\begingroup\$ This looks like what I was looking for at the time. +1. I will take a look and then come back. \$\endgroup\$
    – w0051977
    Commented Aug 11, 2013 at 16:51

I found my answer here. It is a high level overview of the process of adding numbers.

  • 4
    \$\begingroup\$ It's more helpful for future readers if you summarize the material in the answer. Just giving a link to an external resource doesn't add much to EE.SE. \$\endgroup\$
    – The Photon
    Commented Jan 13, 2013 at 18:01
  • 1
    \$\begingroup\$ Please note what @ThePhoton is saying here. Although that youtube video may help you, can you summarize what you learned so that if that video link breaks this is still an answer? \$\endgroup\$
    – Kortuk
    Commented Feb 11, 2013 at 0:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.