notes/education/computer engineering/ECE2700/Binary Logic.md

32 lines
751 B
Markdown
Raw Normal View History

2025-01-09 21:12:03 +00:00
2025-01-10 16:17:02 +00:00
![](./assets/logic-gates.jpeg)
# NOT Gate
A binary NOT gate has a single input, and inverts that input.
## Truth Table
| $x$ | $y$ |
| --- | --- |
2025-01-10 16:22:02 +00:00
| 0 | 1 |
| 1 | 0 |
2025-01-10 16:27:02 +00:00
## Mathematical Expression
2025-01-10 16:22:02 +00:00
A NOT operation is mathematically expressed using a bar:
$$ y = \bar{x} $$
# AND Gate
An AND gate will only output a 1 if *both* inputs are a one.
## Truth Table
| $x_1$ | $x_2$ | $y$ |
| ----- | ----- | --- |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
2025-01-10 16:27:02 +00:00
## Mathematical Expression
An AND operation is mathematically expressed using a times symbol, or with no symbol at all
$$ y = x_1 \cdot x_2 = x_1x_2$$
# NAND Gate
A NAND gate outputs a 1 *unless* both inputs are enabled.
## Truth Table
|