24 lines
1.2 KiB
Markdown
24 lines
1.2 KiB
Markdown
---
|
|
title: Switches and transistors
|
|
categories:
|
|
- Computer Architecture
|
|
- Electronics
|
|
- Hardware
|
|
tags: [logic-gates, binary, memory]
|
|
---
|
|
|
|
# Switches and transistors
|
|
|
|
In the discussion of [digital circuits](/Electronics/Digital_circuits.md) we noted that a digital circuit requires that electrical phenomena be treated as discrete rather than continuous values. Although a given voltage at a point in the circuit can vary widely, in order to represent the binary states of 'on' and 'off' we need it to remain fixed within certain narrow parameters. Typically a value between 2V - 5V for the 'on' state and 0V - 0.8V.
|
|
|
|
We will look at two ways to achieve this. Firstly with literal switches which are impractical but useful for understanding the concept and then with transistors which are what are actually used in computers.
|
|
|
|
## Implementing binary logic with mechanical switches
|
|
|
|
An electrical switch is inherently binary. When the switch is on, it acts like a simple copper wire through which current flows freely. When the switch is off, it acts like an open circuit and no current can flow.
|
|
|
|
We can combine switches in a circuit to create analogs to logic gates.
|
|
|
|
- Example of AND and OR
|
|
|
|
## Transistors
|