UNIVERSAL GATE - NOR

Problem Description

Universal Gate Lab: Build All Logic Using NOR Only

You are designing a minimal silicon library for a radiation-hardened space processor. Due to manufacturing constraints, only NOR gates are allowed in the standard cell library.

Your mission: implement multiple logic gates using ONLY the provided NOR gate module.


🧠 The Problem

A working nor_gate module is already provided.

You must complete the following modules using only NOR gate instantiations:

  • nor_to_not_gate

  • nor_to_or_gate

  • nor_to_and_gate

  • nor_to_nand_gate

  • nand_to_xor_gate

⚠️ You are NOT allowed to use:

  • assign with logical operators (&, |, ^, ~)

  • Built-in gate primitives

  • Behavioral logic

Only structural instantiation of nor_gate is allowed.


📌 Example Truth Snippet

a

b

NOT(a)

OR

AND

NAND

XOR

0

0

1

0

0

1

0

0

1

1

1

0

1

1

1

0

0

1

0

1

1

1

1

0

1

1

0

0


Verilog

Code Editor Access

Log in to write, run and submit your solution to this interview question. It's free.

Output

Output goes here...