How do CPU/GPU “process”?

572 views

Like they don’t have moving parts, or do they? How does it decide where to send current based on the other currents/inputs etc coming in?

In: Technology

4 Answers

Anonymous 0 Comments

The core problem that a cpu need to solve is calculation. Its inputs has three parts: two operands and one operator.

With basic wires/diode/transistors etc we can build circuits that calculate +-*/ etc arithmetic calculations and logical operation like AND/OR/XOR/NAND etc. We can put all those circuits into our cpu. We call this whole unit ALU(Arithmetic logic unit).

So now the cpu can calculate all the possible operations results based on the two operands that we provided. But how does it decide which one to choose?

Actually, we have another circuit structure called multiplexer (MUX), which has n+1 input and 1 output. What it does is to choose one result out of those n inputs to output based on the last input value.

Then there’s control unit, which can translate the instruction we provided and tell other components like ram how to respond to the instruction we required.

To sum up: first the control unit gets the instruction, it feeds the data including two operands to ALU and a selector value to MUX. ALU then use all of it circuits to calculate all results based on those two operands without knowing operator. Then feed all those results to MUX. At the end the MUX choose one of those results and output it.

You are viewing 1 out of 4 answers, click here to view all answers.