🔌
nand2tetris
  • Introduction
  • Combinational Chips
    • Nand Gate
    • Not Gate
    • And Gate
    • Or Gate
    • Xor Gate
    • Multiplexor Chip
    • Demultiplexor Chip
    • Not16 Chip
    • And16 Chip
    • Or16 Chip
    • Mux16 Chip
    • Or8Way Chip
    • Mux4Way16 Chip
    • Mux8Way16 Chip
    • DMux4Way Chip
    • DMux8Way Chip
    • Half Adder Chip
    • Full Adder Chip
    • Add16 Chip
    • Inc16 Chip
    • Half Subtractor Chip
    • Full Subtractor Chip
    • Subtract16 Chip
    • Dec16 Chip
    • Arithmetic Chip
    • ALU
  • Misc
    • Int2Bool
    • Bool2Int
    • Arrayto16
Powered by GitBook
On this page
  • Not Gate
  • Implementation of Not Gate in HDL
  • Implementation of Not Gate in Java™
  1. Combinational Chips

Not Gate

Abstraction and Implementation of Not Gate in Hardware Design Language and Java™.

PreviousNand GateNextAnd Gate

Last updated 3 years ago

Not Gate

The single-input Not Gate, also referred as Inverter, inverts the value of input.

Abstraction of Not Gate - Representation and Truth Table

Implementation of Not Gate in HDL

Not Gate can be implemented by giving the same input to either input pins of Nand Gate.

CHIP Not {
    IN in;
    OUT out;

    PARTS:
    Nand(a=in, b=in, out=out);
}

Implementation of Not Gate in Java™

Similar to the Implementation in HDL

package CombChips;

class Not_Gate extends Nand_Gate {

    protected static int Not(int a) {
        return Nand(a, a);
    }
}
Implementation of Not Gate from Nand Gate