NAND Gate
beginner · combinational · 25 XP
Sign in to write your solution, run it in the simulator and submit it for grading.
Sign in or create a free account →Problem
NAND Gate
Implement a 2-input NAND gate. Output is the complement of AND: low **only** when both inputs are high.
**Truth Table**
| a | b | y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
**Notes** — NAND is functionally complete: any logic function can be built from NAND gates alone.
Constraints
- Use a single assign with ~( ) around the & expression.
Examples
Input: a=1, b=1
Output: y=0
Input: a=0, b=1
Output: y=1
Common questions
- What does the NAND Gate problem ask you to build?
- NAND Gate Implement a 2-input NAND gate. Output is the complement of AND: low **only** when both inputs are high.
- What constraints does NAND Gate have?
- Use a single assign with ~( ) around the & expression.
- What is an example input and output for NAND Gate?
- Input a=1, b=1 gives output y=0.
- Which Verilog concepts does NAND Gate practise?
- combinational, gates.