# Transistors (Changing Bits)

The most important invention in the history of computers is (arguably) the transistor. A transistor can serve two purposes:

* It can amplify a signal (transistor radio).
* It can switch on and off ridiculously fast. \
  &#x20;   This fast switching is what allows a computer to make decisions ***very*** fast.

<div align="center"><img src="https://1200419583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKbpNQDFNJap9OTDSt6%2F-LMZww5hywH9ZWzkVNP8%2F-LM_-R2_Vy-s-ERryeNd%2F320px-BC548_NPN_Transistor.svg.png?alt=media&#x26;token=49d11706-699f-4aa3-9bdf-fc1bd09cfa97" alt="By commons.wikimedia.org/wiki/User:Inductiveload"></div>

Think of a transistor like a **`gate`** which either allows electricity through (1) or blocks it (0). If a small amount of electricity is applied to the **`base`** pin, whatever is on the **`collector`** pin is permitted through the **`emitter`** pin.

![When the base is "on" the electricity flows out the emitter](https://1200419583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKbpNQDFNJap9OTDSt6%2F-MH8o4_14YnbslLfFPYQ%2F-MH8q3LqcpDYYo4Y61OK%2FTransistor_animation-\(fixed-arrow\).gif?alt=media\&token=0645ed71-51c8-4702-bc7e-3ea987c41ed1)

Controlling electricity like this gives us the ability to create **`boolean logic`** or [**`logic gates`**](https://cs.brash.ca/unit-1/binary-and-logic/logic-gates).

{% hint style="info" %}

### **Consider this:**

Transistors can be made as small as $$10\text{ nanometers}$$ . That's $$0.00001 \text{ millimeters}$$.\
A typical sheet of white printer paper is about $$280,000\text{ nm}$$ thick yet a transistor can be made $$10 \text{ nm}$$. They are so small that Apple's A11 chip in the iPhone X has $$4.3 \text{ billion}$$transistors yet it is only $$88 \text{ mm}^2$$.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cs.brash.ca/unit-1/binary-and-logic/significance-of-switching.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
