💻
Crafting Computer
  • Introduction
  • Logic Circuits
    • Not Gate
    • And Gate
    • Or Gate
    • Xor Gate
    • Multiplexer
    • Demultiplexer
  • Arithmetic Circuits
    • Addition
    • Subtraction
    • Multiplication
  • Arithmetic Logic Unit
  • Memory
    • Cascading Not Gates
    • S R Latch
    • S R Flip Flop
    • D Flip Flop
    • Random Access Memory
  • Von Neumann Architecture
  • Assembly Language
Powered by GitBook
On this page

Was this helpful?

  1. Logic Circuits

And Gate

The not gate we implemented just now is very simple, let's now check out a more complex circuit - the and gate.

We start by specifying the interface of the and gate.

Looking at the truth table of and, we notice that it expects two inputs a and b and produces a single output.

a

b

a and b

0

0

0

0

1

0

1

0

0

1

1

1

So we can declare the header of the and gate as:

and a[1] b[1] -> [1]

Great!

Now since a and b is equivalent to not (a nand b), we can implement the body of the and gate as:

not (nand a b)

Combining the header and the body, we got:

and a[1] b[1] -> [1] =
    not (nand a b)
PreviousNot GateNextOr Gate

Last updated 5 years ago

Was this helpful?