How do logic gates calculate their output?

3.63K views

Do transistors calculate the output? If so, wouldn’t transistors be the most fundamental logic of computers?

Thanks.

In: Technology

12 Answers

Anonymous 0 Comments

Yes, transistors are the building blocks of logic gates, which are the building blocks of computers. But they don’t really ‘calculate’ their output: they’re too simple for that.

At its most basic, a transistor is a switch that lets electricity flow through it when it receives electricity from a “control” input. So for example:

`power`

`|`

`T —-A`

`|`

`output`

The transistor is labeled “T”. If electricity is put in on input “A”, electricity will flow from the power supply to the output. If “A” is off, nothing will flow to the output. So if we hook two transistors up in a chain:

`power`

`|`

`T—-A`

`|`

`T—-B`

`|`

`output`

electricity will only flow all the way to the output if there’s electricity coming in on both input A **and** input B. This is an “AND” gate.

But if we create two parallel paths like two lanes of a highway, and have A and B each control one “lane”, then electricity will flow through if either A **OR** B is on. This is an OR gate.

(Unfortunately I can’t draw this with ascii art on Reddit.)

… and that’s the starting point for all of computers.

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