How do CPUs work anyway?

Status
Not open for further replies.
I was myself puzzled by similar questions for a long time. I just couldn't make the conceptual jump from assembly language to electronic signals. How does an instruction get carried out? How can a simple semiconductor chip understand an order to add two numbers?

Well, there's an easy path to understanding at least part of it all: study how a simple calculator works. Start with the very basic calculator: the full adder. Understand binary addition. Understand how it can be implemented using integrated circuits. Once you can design a basic n-bit adder, expand it by adding substraction. Then introduce registers (through flip-flops or similar devices). If you get this far, you'll start to get a grasp on how "coding instructions" works. Then maybe you can look at how a real pocket calculator works.
 
Meithan has the majority of this. Thats a very good explanation. You will probably agree with me then that to explain this in simple fasion would be very hard unless some fundamental and a little advanced knowledge is learned. Anyhow, this instruction set is built from a binary code system. To truelly expalin this you would really need to know how to program in binary. Remember, the representation of, say the letter a in binary is 01100001 (capital letter A is 01000001). You build this up creating instruction sets on how data is entered via simple boolean sets, build more on that (boolean is true/false yes/no 1/0) and you soon create a VERY limited instruction set on how data is treated that is contained in either certain cache or in chipset data. Data is passed through th processor via pulse sets to these the first set of instruction value that compares (using small transistors to switch on off 1/0 true fale you get the idea) and this is then moved along a heirarchy of data sets to determine what to do. Your question is truely not an easy one to answer unless you have some background in programming and base sets.
 
The General said:
So long as? I always thought the phrase was "as long as" :freak::eek:

He lives in the UK man. It's probably the same as the whole "By the by" and "by the way" deal.
 
Maybe we can try to explain a bit more clearly. joshd, do you know how to add numbers in binary? How about subtracting numbers? If you don't know, we can start doing that, it's not hard. It may not seem relevant to your question but it is. After that I can show you a very simplified calculator and exactly how the "add" or "substract" instructions are coded in such a system.
 
Status
Not open for further replies.
Back
Top Bottom