Hardware how does a Processor work?

  • Thread starter Thread starter Isaac
  • Start date Start date
  • Views Views 1,342
  • Replies Replies 4
A central processing unit (CPU), also referred to as a central processor unit,[1] is the hardware within a computer that carries out the instructions of a computer program by performing the basic arithmetical, logical, and input/output operations of the system. The term has been in use in the computer industry at least since the early 1960s.[2] The form, design, and implementation of CPUs have changed over the course of their history, but their fundamental operation remains much the same.
From Wikipedia.

It's full of transistors arranged in clusters according to function. Some parts do the math, some parts queue up instructions, some part allocates resources to memory, etc.
 
Snailface is heading in the direction I would.

Generally there are three classes of instructions a computer can do
1) Basic arithmetic
2) Getting things in order (shifting data about, doing what is called a logical shift, reading other data)
3) Branching. "If this is true then"

You can build an adding machine out of basic logic and basic logic you can build up from basic components (for the record a NAND gate becomes any other gate if you want it to be) and basic components are not so advanced you can not understand them.
Likewise everything is adding

Adding is adding
Subtraction is adding (5-5 = 5+ -5 after all)
Multiplication is adding (5*3 = 5+5+5)
Division is adding (5/3 = X and logX = log 5- Log 3), not all processors have division though (the GBA and DS do not have it in CPU for instance). You can also use logs to multiply if you want.

A basic security check
You have a file and know what all the numbers in it (computer files are just numbers after all) sum to.
You send it to someone else.
They then add up all the numbers in the file you sent
Subtract result from known sum.
If new result does not equal 0 goto "file broken" else goto file correct.
This is the idea behind assembly programming and it gets quite tedious (this is why we have programming languages).

It gets a lot more advanced as the basic implementations are not that useful (I like big numbers), not that programmable (it is a pain to handle lots of numbers) and not that secure (I can not easily run multiple programs and not have them interfere with each other). The question of how does the first instruction come is usually solved by the designer of the system. Modern computers hand this off several times before you are staring at your desktop (to say nothing of the security) but it is still based on the same thing.
 
it should be noted that the part of the processor that actually does the work (adding, shifting, and comparing numbers and data) is often the smallest and simplest part of the system in modern computers.
 

Site & Scene News

Popular threads in this forum