Files
web/content/notes/ready/logic_gates/index.md

1.3 KiB

title, description, draft, tags, author, showToc
title description draft tags author showToc
Logic Gates false
electronics
computer-science
TrudeEH true

NOT

Invert the input.
image42

Truth Table

Input Output
0 1
1 0

AND

Output 1 only when both inputs are 1.
image43

Truth Table

A B Output
0 0 0
0 1 0
1 0 0
1 1 1

OR

Output 1 if at least one input is 1.
image44

Truth Table

A B Output
0 0 0
0 1 1
1 0 1
1 1 1

NAND

An AND gate followed by a NOT gate.
image45

Truth Table

A B Output
0 0 1
0 1 1
1 0 1
1 1 0

NOR

An OR gate followed by a NOT gate.
image46

Truth Table

A B Output
0 0 1
0 1 0
1 0 0
1 1 0

XOR

Either input is 1, exclusively.
image47
image48

Truth Table

A B Output
0 0 0
0 1 1
1 0 1
1 1 0

XNOR

Inverted XOR.
image49

Truth Table

A B Output
0 0 1
0 1 0
1 0 0
1 1 1

Implementation Examples

NOT

image50

AND

image51
image52

OR

image53