How does processors work




















Instructions also could be simplified to speed up the decoding process. Reduced in this case means the time to complete an instruction is reduced. To summarize the ideas of RISC:. There have been other attempts at instruction set design. VLIW crams multiple independent instructions into a single unit to be run on multiple execution units. Early on, computers could do only one thing at a time and once it got going, it would go until completion, or until there was a problem with the program.

As systems became more powerful, an idea called "time sharing" was spawned. Time sharing would have the system work on one program and if something blocked it from continuing, such as waiting for a peripheral to be ready, the system saved the state of the program in memory, then moved on to another program. Eventually, it would come back to the blocked program and see if it had what it needed to run. Time sharing exposed a problem: A program could unfairly hog the system, either because the program really had a long execution time or because it hung somewhere.

So the next systems were built such that they would work on programs in slices of time. That is, every program gets to run for a certain amount of time and after the time slice is up, it moves on to another program automatically. If the time slices are small enough, this gives the impression that the computer is doing multiple things at once. One important feature that really helped multitasking is the interrupt system.

Cache is memory in the processor that, while small in size, is much faster to access than RAM. The idea of caching is that commonly used data and instructions are stored in it and tagged with their address in memory. The more times the data is accessed, the closer its access time reaches cache speed, offering a boost in execution speed.

Normally, data can only reside in one spot in cache. Originally, CPUs had a single processing core. Most CPUs sold today have two or four cores. Six cores are considered mainstream, while more expensive chips range from eight to a massive 64 cores.

Many processors also employ a technology called multithreading. Clock speed is prominently advertised when you are looking at CPUs. Clock speed mostly comes into play when comparing CPUs from the same product family or generation. When all else is the same, a faster clock speed means a faster processor. However, a 3GHz processor from will deliver less work than a 2GHz processor from So, how much should you pay for a CPU?

We have several guides to give you some suggestions for the best CPUs you can buy. Inside the package is a silicon rectangle containing millions of transistorized circuits. From the device protrude dozens of metal pins, each of which carries electronic signals into and out from the chip. The chip plugs into a socket on the computer's circuit board and communicates with memory, hard drives, display screens and other devices external to the CPU. A timing circuit called a clock sends electrical pulses to the CPU.

Depending on the processor, the clock may run at speeds ranging from hundreds of thousands to billions of cycles per second. The pulses drive activity inside the CPU; because other circuits depend on the same clock, it keeps complex events in the computer synchronized. All CPUs have an instruction set -- a list of actions the processor performs, including adding numbers, comparing two pieces of data and moving data into the CPU. The software you run on your computer consists of millions of the CPU's instructions laid out in a sequence; instructions are very simple operations, so the CPU performs many of them to accomplish meaningful tasks.

Some families of CPUs, such as the ones used in desktop PCs, use the same instruction set, allowing them to run the same software. Mobile Newsletter chat dots. Mobile Newsletter chat avatar. Mobile Newsletter chat subscribe. Computer Hardware. How Microprocessors Work. Microprocessors are at the heart of all computers.

Microprocessor Progression: Intel " ". Introduced by Intel in , the microprocessor was the first microprocessor powerful enough to build a computer around. What's a Chip? Microprocessor Logic " ". The Intel Pentium 4 processor was Intel's fastest processor when it was introduced in Modern microprocessors contain complete floating-point processors that can perform extremely sophisticated operations on large floating-point numbers.

A microprocessor can move data from one memory location to another. A microprocessor can make decisions and jump to a new set of instructions based on those decisions. This diagram shows a simple microprocessor and its components and capabilities.

An address bus that may be 8, 16, 32 or 64 bits wide that sends an address to memory A data bus that may be 8, 16, 32 or 64 bits wide that can send data to memory or receive data from memory An RD read and WR write line to tell the memory whether it should set or get the addressed location A clock line that lets a clock pulse sequence the processor A reset line that resets the program counter to zero or whatever and restarts execution.

Registers A, B and C are simply latches made out of flip-flops. See the section on "edge-triggered latches" in How Boolean Logic Works for details. The address latch is just like registers A, B and C. The program counter is a latch with the extra ability to increment by 1 when told to do so, and to reset to zero when told to do so. The ALU could be as simple as an 8-bit adder see the section on adders in How Boolean Logic Works for details , or it might be able to add, subtract, multiply and divide 8-bit values.

Let's assume the latter here. The test register is a special latch that can hold values from comparisons performed in the ALU. An ALU can normally compare two numbers to determine if they are equal, if one is greater than the other, etc. The test register can also normally hold a carry bit from the last stage of the adder. It stores these values in flip-flops and then the instruction decoder can use the values to make decisions. There are six boxes marked "3-State" in the diagram.

These are tri-state buffers. A tri-state buffer can pass a 1, a 0 or it can essentially disconnect its output imagine a switch that totally disconnects the output line from the wire that the output is heading toward. A tri-state buffer allows multiple outputs to connect to a wire, but only one of them to actually drive a 1 or a 0 onto the line.

The instruction register and instruction decoder are responsible for controlling all of the other components. Tell the A register to latch the value currently on the data bus Tell the B register to latch the value currently on the data bus Tell the C register to latch the value currently output by the ALU Tell the program counter register to latch the value currently on the data bus Tell the address register to latch the value currently on the data bus Tell the instruction register to latch the value currently on the data bus Tell the program counter to increment Tell the program counter to reset to zero Activate any of the six tri-state buffers six separate lines Tell the ALU what operation to perform Tell the test register to latch the ALU's test bits Activate the RD line Activate the WR line.

Microprocessor Instructions Even the incredibly simple microprocessor shown in the previous example has a fairly large set of instructions that it can perform. Here's the set of assembly language instructions that the designer might create for the simple microprocessor in our example: Advertisement. During the first clock cycle, we need to load the instruction. Therefore, the instruction decoder needs to: activate the tri-state buffer for the program counter activate the RD line activate the data-in tri-state buffer latch the instruction into the instruction register During the second clock cycle, the ADD instruction is decoded.



0コメント

  • 1000 / 1000