Skip to content

NOR Gate

A digital logic NOR gate that outputs LOW when at least one of its inputs is HIGH.

Component Preview

NOR GateNOR Gate

A digital logic gate that implements logical NOR (NOT-OR). It produces a HIGH output only when all of its inputs are LOW. If any input is HIGH, the output is LOW.

Logic ComponentsDigital Logic

Overview

The NOR Gate is a universal logic gate (meaning any other logic function can be constructed using only NOR gates). It evaluates multiple digital signals and returns true (HIGH) only if all conditions are false (LOW).

Pin Reference

PinTypeDescription
IN1inputFirst digital logic input. Expects HIGH (1) or LOW (0).
IN2inputSecond digital logic input. Expects HIGH (1) or LOW (0).
OUTdigitalDigital logic output. Driven LOW if IN1 or IN2 is HIGH. Driven HIGH only if both are LOW.

Configurable Attributes

This component currently has no configurable attributes.

Working Principle

Truth Table

IN1IN2OUT
0 (LOW)0 (LOW)1 (HIGH)
0 (LOW)1 (HIGH)0 (LOW)
1 (HIGH)0 (LOW)0 (LOW)
1 (HIGH)1 (HIGH)0 (LOW)

The NOR Gate models the inverted result of Boolean addition: Y = (A + B)'.

Wiring Diagram

Wiring Diagram

Example Arduino Code

cpp
const int pinIn1 = 2; // Connect to IN1
const int pinIn2 = 3; // Connect to IN2
const int pinOut = 4; // Connect to OUT

void setup() {
  Serial.begin(9600);
  pinMode(pinIn1, OUTPUT);
  pinMode(pinIn2, OUTPUT);
  pinMode(pinOut, INPUT);
  Serial.println("NOR Gate Truth Table Test:");
}

void loop() {
  for (int state = 0; state < 4; state++) {
    bool val1 = (state & 1);
    bool val2 = (state & 2) >> 1;

    digitalWrite(pinIn1, val1 ? HIGH : LOW);
    digitalWrite(pinIn2, val2 ? HIGH : LOW);
    delay(10);
    
    int result = digitalRead(pinOut);
    
    Serial.print("IN1: ");
    Serial.print(val1);
    Serial.print(" | IN2: ");
    Serial.print(val2);
    Serial.print(" => OUT: ");
    Serial.println(result);
    delay(1000);
  }
}

Simulation Notes

  • Evaluates logic instantaneously.
  • Floating inputs may cause undefined behavior. Tie unused inputs to Ground.

Notes / Warnings

  • Voltage Levels: The simulator treats standard logic signals as valid inputs. Do not apply analog voltages.

Released under the MIT License.