From bcae81336764eb6c4cdf0f91e2fe632b625dd8b2 Mon Sep 17 00:00:00 2001 From: Prefetch Date: Sun, 23 Oct 2022 22:18:11 +0200 Subject: Optimize and improve naming of all images in knowledge base --- source/know/concept/toffoli-gate/and.avif | Bin 0 -> 2109 bytes source/know/concept/toffoli-gate/index.md | 24 ++++++------------------ source/know/concept/toffoli-gate/nand.avif | Bin 0 -> 1834 bytes source/know/concept/toffoli-gate/not.avif | Bin 0 -> 1518 bytes source/know/concept/toffoli-gate/or.avif | Bin 0 -> 3505 bytes source/know/concept/toffoli-gate/toffoli.avif | Bin 0 -> 1261 bytes source/know/concept/toffoli-gate/xor.avif | Bin 0 -> 2128 bytes 7 files changed, 6 insertions(+), 18 deletions(-) create mode 100644 source/know/concept/toffoli-gate/and.avif create mode 100644 source/know/concept/toffoli-gate/nand.avif create mode 100644 source/know/concept/toffoli-gate/not.avif create mode 100644 source/know/concept/toffoli-gate/or.avif create mode 100644 source/know/concept/toffoli-gate/toffoli.avif create mode 100644 source/know/concept/toffoli-gate/xor.avif (limited to 'source/know/concept/toffoli-gate') diff --git a/source/know/concept/toffoli-gate/and.avif b/source/know/concept/toffoli-gate/and.avif new file mode 100644 index 0000000..357c40d Binary files /dev/null and b/source/know/concept/toffoli-gate/and.avif differ diff --git a/source/know/concept/toffoli-gate/index.md b/source/know/concept/toffoli-gate/index.md index 7de7600..ba9d3ba 100644 --- a/source/know/concept/toffoli-gate/index.md +++ b/source/know/concept/toffoli-gate/index.md @@ -16,43 +16,31 @@ of which it returns $$A$$ and $$B$$ unchanged, and flips $$C$$ if both $$A$$ and $$B$$ are true. In circuit diagrams, its representation is: - - - +{% include image.html file="toffoli.png" width="19%" alt="Toffoli gate symbol" %} This gate is reversible, because $$A$$ and $$B$$ are preserved, and are all you need to reconstruct to $$C$$. Moreover, this gate is universal, because we can make a NAND gate from it: - - - +{% include image.html file="nand.png" width="38%" alt="NAND gate made of Toffoli gate" %} A NAND is enough to implement every conceivable circuit. That said, we can efficiently implement NOT, AND, and XOR using a single Toffoli gate too. Note that NOT is a special case of NAND: - - - +{% include image.html file="not.png" width="32%" alt="NOT gate made of Toffoli gate" %} - - - +{% include image.html file="and.png" width="35%" alt="AND gate made of Toffoli gate" %} - - - +{% include image.html file="xor.png" width="35%" alt="XOR gate made of Toffoli gate" %} Using these, we can, as an example, make an OR gate from three Toffoli gates, thanks to the fact that $$A \lor B = \neg (\neg A \land \neg B)$$, i.e. OR is NAND of NOT $$A$$ and NOT $$B$$: - - - +{% include image.html file="or.png" width="50%" alt="OR gate made of Toffoli gates" %} Thanks to its reversibility and universality, the Toffoli gate is interesting for quantum computing. diff --git a/source/know/concept/toffoli-gate/nand.avif b/source/know/concept/toffoli-gate/nand.avif new file mode 100644 index 0000000..53a5d65 Binary files /dev/null and b/source/know/concept/toffoli-gate/nand.avif differ diff --git a/source/know/concept/toffoli-gate/not.avif b/source/know/concept/toffoli-gate/not.avif new file mode 100644 index 0000000..b277a83 Binary files /dev/null and b/source/know/concept/toffoli-gate/not.avif differ diff --git a/source/know/concept/toffoli-gate/or.avif b/source/know/concept/toffoli-gate/or.avif new file mode 100644 index 0000000..82dd391 Binary files /dev/null and b/source/know/concept/toffoli-gate/or.avif differ diff --git a/source/know/concept/toffoli-gate/toffoli.avif b/source/know/concept/toffoli-gate/toffoli.avif new file mode 100644 index 0000000..9c34431 Binary files /dev/null and b/source/know/concept/toffoli-gate/toffoli.avif differ diff --git a/source/know/concept/toffoli-gate/xor.avif b/source/know/concept/toffoli-gate/xor.avif new file mode 100644 index 0000000..8ed742d Binary files /dev/null and b/source/know/concept/toffoli-gate/xor.avif differ -- cgit v1.2.3