how does a Processor work?

Discussion in 'Computer Hardware, Devices and Accessories' started by Isaac, Jun 23, 2013.

  1. Isaac

    Isaac American

    Dec 8, 2012
    United States
    Here? Right here? What about, say... over there?
    So I was wondering, What exactly does the processor of the computer actually do? What I mean is how does it process data? Thanks in advanced.
  2. Originality

    Originality Chibi-neko

    Apr 21, 2008
    London, UK
    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.
  3. Snailface

    Snailface My frothing demand for 3ds homebrew is increasing

    Sep 20, 2010
    Engine Room with Cyan, watching him learn.
    This is a more specific answer.

    first digital logic
    then the instruction cycle

    Hint: learn a little C and write a chip 8 emulator, its a great way to learn CPU basics.
  4. FAST6191

    FAST6191 Techromancer

    pip Reporter
    Nov 21, 2005
    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.
  5. PityOnU

    PityOnU GBAtemp Advanced Fan

    Jul 5, 2012
    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.