REDSTONEPEDIA › Circuits › Logic gates

Logic gate

NOT (A AND B) · 2 blocks

It has two inputs, A and B. The output is on unless both A and B are on.

reacts in 2 ticks (0.1 s) · made of redstone torch · fits in 2×1×2

NOT (A AND B)Logic gate3D view loading (or not available in this browser)

Try it

Use the A and B buttons under the view to drive the inputs: the box marked OUT turns red while the output is on. Press play under the view to watch a demo on a loop; touch any other control to take over.

How this design does it: NAND gate, 2 blocks: a wall torch hanging on each input block, and the output lamp touching both torches.

Build it

Download .litematic Download the design as text

The .litematic opens in Litematica (Minecraft 26.3): every block of the design in one region. The text file is the same build written as plain text, block by block.

Blocks used: redstone torch

Details: how it works, measurements and properties

In depth

A logic gate: the output depends only on the inputs right now. NAND: the output is off only while A and B are both on (NOT AND).

ABOUT
offoffon
offonon
onoffon
ononoff

The output settles 2 ticks (0.1 s) after an input changes.

How to try it

Press play under the view to watch the demo on a loop (the badge reads demo with the step it is on; the same sequence is drawn as a timing diagram below). Touch any control to stop it and try the circuit yourself.

To try it: tap the A button of the bar (or the cell tagged A) to turn that input on or off (it powers the cell with a redstone block); tap the B button of the bar (or the cell tagged B) to turn that input on or off (it powers the cell with a redstone block).

Inputs are tagged in lime; the output is tagged OUT: the redstone lamp in that cell (the view adds it to show the output) lights while the output is on (the output strip by the demo badge shows its last 40 game ticks, 2 seconds). Drag to look around, pinch or scroll to zoom, step one game tick at a time with the step button.

Inputs and output over time

The inputs follow this schedule (the 3D view's demo plays the same). Lime: an input is on; orange: the output is on (taller = a stronger signal, 1 to 15). Time runs left to right in game ticks (20 ticks = 1 s).

00 (rest)010010001101100111101100ABOUTticks020406080100120140160180200220240260

Swipe the diagram sideways: the whole sequence lasts 281 ticks (14.05 s).

Step by step (13 lines)
00 (rest): output 1
-> 01: output 1
-> 00: output 1
-> 10: output 1
-> 00: output 1
-> 11: output 0 after 2 ticks (0.1 s)
-> 01: output 1 after 2 ticks (0.1 s)
-> 10: output 1
-> 01: output 1
-> 11: output 0 after 2 ticks (0.1 s)
-> 10: output 1 after 2 ticks (0.1 s)
-> 11: output 0 after 2 ticks (0.1 s)
-> 00: output 1 after 2 ticks (0.1 s)

Measurements

metricvaluewhat it means
functionnandthe logic function the truth table names
latency2 ticks (0.1 s)the worst time from an input change to the output's change

Notes from its designer

NAND gate, 2 blocks: a wall torch hanging on each input block, and the output lamp touching both torches. Each torch goes out when its own input is on, so the lamp stays lit unless BOTH inputs are on.

Properties

StudyLogic gates
KindLogic gate
Blocks placed2 (not counting the input levers or buttons and the lamp the view adds)
Box2×1×2 (4 blocks of space)
Made of (the blocks that change state)redstone torch
Inputs / outputsA (repeater), B (repeater) / OUT
Design filegate-nand

The design file

on GitHub

Design file (14 lines)
# Logic gate: NOT (A AND B) · 2 blocks
# https://vjeux.github.io/redstonepedia/circuits/gates/gate-nand.html
name: gate-nand
circuit: gate nand
port input.a: 0 1 0
port input.b: 2 1 2
port output: 2 1 0
origin: 1 0 0
palette:
  E minecraft:redstone_wall_torch[facing=east,lit=true]
  N minecraft:redstone_wall_torch[facing=north,lit=true]
layer 1:
  E.
  .N