Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
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.. –  Brian Drummond Jan 6 '13 at 11:52
Your first diagram maps to the Z80 CPU in the second diagram. –  starblue Jan 7 '13 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!

share|improve this answer
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. –  w0051977 Jan 6 '13 at 15:26
...then I would start with "Switch Design" in the Readings and work forward in the lessons from there. –  DrFriedParts Jan 6 '13 at 19:28
Your list of topics manages to throw in several which are irrelevant to the question, while skipping over those which are most relevant. –  Chris Stratton Aug 11 '13 at 14:56
@Chris -- No it doesn't. –  DrFriedParts Aug 11 '13 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.

share|improve this answer
up vote 1 down vote accepted

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

share|improve this answer
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. –  The Photon Jan 13 '13 at 18:01
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? –  Kortuk Feb 11 '13 at 0:59

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.

share|improve this answer
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. –  PeterJ Aug 11 '13 at 13:26
This looks like what I was looking for at the time. +1. I will take a look and then come back. –  w0051977 Aug 11 '13 at 16:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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