Hardware how does a Processor work?

Originality

Chibi-neko
Member
Joined
Apr 21, 2008
Messages
5,708
Trophies
0
Age
32
Location
London, UK
Website
metalix.deviantart.com
XP
1,819
Country
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

My frothing demand for 3ds homebrew is increasing
Member
Joined
Sep 20, 2010
Messages
4,324
Trophies
1
Age
37
Location
Engine Room with Cyan, watching him learn.
XP
2,210

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
33,882
Trophies
2
Website
trastindustries.com
XP
22,622
Country
United Kingdom
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.
 

PityOnU

Well-Known Member
Member
Joined
Jul 5, 2012
Messages
1,166
Trophies
0
XP
1,478
Country
United States
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.
 
General chit-chat
Help Users
    kenenthk @ kenenthk: From scratch yeah