eolas/Hardware/Logic_Gates/Not_gate.md

51 lines
2 KiB
Markdown
Raw Normal View History

2022-06-04 16:00:04 +01:00
---
2022-08-20 12:30:04 +01:00
categories:
2022-08-21 11:00:04 +01:00
- Computer Architecture
2022-06-04 16:00:04 +01:00
- Electronics
- Hardware
2022-08-20 15:30:04 +01:00
tags: [logic-gates, binary]
2022-06-04 16:00:04 +01:00
---
2022-08-20 12:30:04 +01:00
2022-06-04 16:00:04 +01:00
# NOT gate
2022-06-05 10:30:04 +01:00
This gate corresponds to the negation logical connective.
2022-06-04 16:00:04 +01:00
2022-06-05 10:30:04 +01:00
Negation switches the value of a proposition from `true` to `false`. When we put `~` before `true` it becomes `false` and when we put `~` before `false` it becomes `true` .
2022-06-04 16:00:04 +01:00
2022-06-05 10:30:04 +01:00
The truth-table for negation:
````
P ~P
T F
F T
````
In terms of gates this logic obviously corresponds to a simple on/off switch.
2022-06-04 16:00:04 +01:00
2022-06-05 10:30:04 +01:00
In terms of pure logic, negation is an unary connective in contrast to binary connectives like conjuction and disjunction. It doesn't operate on two parts it simply switches the truth value of whichever proposition it is applied to.
2022-06-04 16:00:04 +01:00
2022-06-05 10:30:04 +01:00
How then, can it be expressed in terms of a gate that takes two inputs and returns an output? Well, we can recreate the logic by manipulating a NAND gate. (Demonstrating the point that many logical conditions are expressible purely via NAND gates.)
2022-06-04 16:00:04 +01:00
2022-06-05 10:30:04 +01:00
Although a NAND can take a total of two inputs, it would be controlled by a single switch, such that both inputs would be set to `1 1` or `0 0` when the switch is activated and deactivated. This would remove the `AND` aspect of `NAND` and reduce it to `NOT` .
2022-06-04 16:00:04 +01:00
A NAND gate simulating NOT logic
![Screenshot_2020-08-25_at_15.09.01.png](../../img/Screenshot_2020-08-25_at_15.09.01.png)
2022-06-05 10:30:04 +01:00
Going back to the truth-conditions for NAND, NAND-as-NOT just means that the conditons on lines 1 and 4 obtain:
```
A B C
_ _ _
0 0 1 1
1 0 1 2
0 1 1 3
1 1 0 4
```
2022-06-04 16:00:04 +01:00
### Symbol for `NOT` gate
NOT has its own electrical symbol to distinguish it from a NAND:
![Screenshot_2020-08-25_at_15.18.34.png](../../img/Screenshot_2020-08-25_at_15.18.34.png)
2022-06-05 10:30:04 +01:00
Note that as this is an abstraction of the process, there is no need to show two inputs in the representation of the gate. We have a single input and single output reflecting the unary nature of the negation operator.