Showing posts with label CPU. Show all posts
Showing posts with label CPU. Show all posts

Wednesday, July 18, 2012

CPU functions


CPU functions like a calculator, only much more powerful CPU processing power. The main function of the CPU is to perform arithmetic and logic operations on data retrieved from memory or from the information entered via some hardware, such as keyboard, scanner, lever controls, and mouse. CPU controlled using a set of instructions the computer software. Such software can be executed by the CPU to read from the storage media, such as hard disks, floppy disks, compact discs, or tape recorder. These instructions are then stored in advance in physical memory (MAA), in which each instruction is assigned a unique address called a memory address. Next, the CPU can access data on the MAA by specifying the address data is desired.

When a program is executed, the data flow from the RAM into a unit called a bus, which connects the CPU with the MAA. The data was then decoded by using a unit process referred to as pendekoder instructions that can translate the instructions. The data then goes to the arithmetic and logic unit (ALU) which performs calculations and comparisons. Data can be stored temporarily by the ALU in a memory location called a register that can be taken back to be processed quickly. ALU can perform certain operations such as addition, multiplication, and conditional tests on data in registers, sending the results back into physical memory processing, storage media, or register if will process the results of processing anymore. During this process, a unit of the CPU called the program counter will monitor the success of instructions executed so that instruction can be executed in the correct and appropriate.


Processing instructions in the CPU is divided into two phases, Phase-I called the Instruction Fetch, while Phase-II is called Instruction Execute. Phase-I consists of the Control Unit in which the CPU processing the data and / or instructions from main-memory to the register, while Phase-II consists of the CPU processing where the Control Unit to deliver the data and / or instruction from the register to the main-memory to be accommodated in the MAA, after Instruction Fetch done. Time on stage coupled with time-I-II phase is called the machine cycle time (machine cycles time).

In the CPU program counter is generally moving in sequence. However, some instructions in the CPU, which is called by a jump instruction, allowing the CPU to access the instruction is not in order. This is called branching instructions (branching instruction). Branches can be such instructions are conditional branches (having a certain condition) or non-conditional. A branch of a non-conditional always move to a new instruction that is outside the flow of instruction, while a conditional branch will first examine the results of previous operations to see if the branch instruction to be executed or not. Data were tested for the branching instruction is stored at a location called the flag.

Most CPUs can handle two types of numbers, namely fixed-point and floating-point. Fixed-point numbers have a specific digit value at one decimal point. This does limit the range of possible values ​​for these figures, but this would be calculated by the CPU faster. Meanwhile, floating-point numbers are numbers expressed in scientific notation, where a number is represented as a decimal number is multiplied by powers of 10 (such as 3.14 x 1057). Scientific notation like this is a short way of expressing very large numbers or very small numbers, and also allow the range of values ​​that are very far before and after the decimal point. These numbers are generally used to represent graphs and scientific work, but the arithmetic of floating-point numbers are much more complicated and can be completed in a longer time by the CPU as they may be able to use some CPU cycle rate. Some computers use its own processor to calculate a floating-point numbers called with FPU (also called a math co-processor) that can work in parallel with the CPU to speed up floating-point computation. FPU is now a standard in most computers because most application as it currently operates using floating-point numbers.

Central Processing Unit or CPU


You must know that so-called Central processing unit, or CPU,
CPU in charge of controlling the computer so that synchronization occurs antarkomponen work in running the operations functions. included in the control unit is the responsibility of taking instructions-instructions from main memory and determine the type of instruction. If there are instructions for arithmetic or logic comparison, the control unit will send instructions to the ALU. The results of processing the data carried by the control unit to the main memory to be stored, and in time will be presented to the output device.

Thus the task of the control unit are:
Regulate and control input devices (input) and output (output).
Taking instructions from main memory.
Retrieve data from main memory (if required) for processing.
Send instructions to the ALU if any arithmetic or logical comparisons and oversees the work of the ALU.
Save the results into the main memory.
Register is a small storage device that has high speed access, which is used to store data and / or instructions are being processed. This memory is temporary, usually used to store data on if or when the data for subsequent processing. By analogy, these registers can be likened to a memory in the brain when we do data processing manually, so the brain can be likened to the CPU, which contains the memories, the control unit that governs all activities of the body and having a place to perform the calculation and comparison logic.

ALU unit is tasked to perform arithmetic operations and logic operations defined by the instruction. ALU is often called the machine language for this section ALU consists of two parts, the unit arithmetika and boolean logic units, each of which has its own job specification. The main task of the ALU is performing all arithmetic calculations that occur in accordance with the instructions of the program. ALU does all the basic arithmetic operations so that the sum of the electronic circuit used is called adder.

Another task of the decision of the ALU is to perform a logic operation according to the instructions of the program. Logic operation involves the comparison of two operands by using a certain logical operators, which is equal to (=), not equal to (¹), is less than (<), less than or equal to (£), greater than (>), and greater or equal to (³).
Interconnections are the CPU and bus connection system that connects the internal components of the CPU, the ALU, control unit and registers, and also with external buses connecting the CPU with other systems, such as main memory, the device input / output.