How do transistors translate into computations?

277 views

I do not understand how transistors are used to compute, especially how immense amounts of them are used, how does what know the states of all of them?

In: 1

5 Answers

Anonymous 0 Comments

So, all binary computation relies on two states of each wire: basically “on” and “off”. The transistor itself is a very simple unit. It has two inputs and one output. If input B (“gate”) is off, the gate is open: state from input A proceeds to the output. If input B is on, the gate is closed: output is always off.

Turns out, using this we can start building blocks for binary logic. For example, we can make the “NOT” block that gives us “off” state when the input is on and “on” when the input is off. Just take one transistor, connect your input to the gate and make input A always on.

Using the “NOT” element we can make the “AND” element with two input signals (output is on when both inputs are on): one of the inputs is the “input A” of a transistor and the gate is controlled by “NOT second input”. In a similar way we can build the “OR” element (output is on when either of the inputs is on).

So, using only a few transistors each, we can make all operations of a binary logic. Now we need to turn it into computations. Well, it turns out that if we write numbers in binary form, we can calculate their sum using these operations on their digits in a certain way. So, with a handful of transistors, we can add two numbers together: build an electric circuit where numbers in their binary forms are sent to input wires (one wire per digit) and their sum appears on output wires. With some more effort we can subtract, multiply or divide.

Now we need some control over what we’re doing, so that we can program our processor. We build a circuit for each operation and then, together with the input numbers, we input a special number called the operation code. It is passed through a special circuit that does “if the code is 001, send input numbers to circuit 1; if the code is 010, send them to circuit 2 etc”. Some of this circuits can add numbers together, some can activate operations such as “store this number in memory at this address” or “access a memory cell with this address and output its contents”.

Done, we have a processor. A program is basically just a sequence of codes and arguments (that can be stored in the memory along with the data).

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