WELCOME TO OUR BLOG

CPU



CPU

A CPU or central processing unit are the main brain of the computer. Though I said as "brain", the main CPU function is only to carry out the instruction given to them, in logical way. They don't have any way to do outside the way they we programmed. Sometimes the CPU are commonly referred as "processor", maybe it is derived from the old CPU abbreviation of Central Processor Unit.

Operation

The main role that CPU must take, regardless of their physical form is to carry out a set of intruction that they were given, or also call a program. Typically there will be four steps that nearly all CPUs will use in their operation; "fetch, decode, execute, and writeback".

The first step is "fetch". In this step, the CPU will retrieve the instruction from program memory. Its location are determined by program counter. Usually the program are retrieved from a slow memory, causing the CPU to stall while waiting for the instruction to be returned. Though this issue are addressed by modern processor by using architecture pipeline and memory cache.

The second step is "decode". This step involve breaking the instruction into parts. A group of instruction, called upcode will indicate which operation to performed.

After the fetch and decode steps, the next step will "execute" step. This step will involve portion of CPU as they an performed the desired operation. If additional operation is requested, ALU or
Arithmetic Logic Unit will be connected to a set of input and output. The ALU has circuit that can handle a simple arithmetic calculation. Hence, if the result of the operation is too large for the CPU to handle, an arithmatic overflow flay may also be set.

The final step will be "writeback". It simply "writes back" the results from the execute step into some form of memory. Most of the time the results are written to internal CPU register for quick retrieval by subsequent instructions. The result may even be written the a sloe but more cheap main memory.

After that, the process will repeat themselves, with the next instruction to be fetch. (Remember the program counter...) If the completed instruction was a jump, the program counter will be modified to contain the address of the instruction that was jumped to, and program execution continues normally.

Two typical components of a CPU

  • The arithmetic logic unit (ALU)
  • The control unit (CU)

Clock Rate

One of the most talked about a CPU will be the Clock Rate. Clock Rate are defined is the amount of instruction that can be done in a particular time. Every computer has their internal clock that will regulate the amount of time that an instruction will be carried out and they will synchronize all the computer component. In more laymen term, the faster the clock, the more instruction a computer can handle in a set of time.   

No comments:

Post a Comment