Reputation: 23
I have a 2-1 mux and I'm trying to write z = s'd0 + sd1
using only NAND
, XNOR
, and OR
gates (not necessarily all of them).
I tried simplifying it and what I ended up with is z = NAND(NAND(s', d0), NAND(s, d1))
, but I can't use NOT
('
), so is there a way to write NAND(s', d0)
without the NOT
?
Upvotes: 0
Views: 1059
Reputation: 11479
Simple solution
Full version of the solution proposed by others is (A NAND S) NAND (B NAND (S NAND S))
.
By the way, NOT X
could also be expressed as X NAND 1
, not only as X NAND X
.
Advanced solution
(S OR (A XNOR B)) XNOR A
The latter solution is definitely more interesting:
How to find the latter solution?
(S AND (A XOR B)) XOR B
.AND
and XOR
with OR
and XNOR
respectively) and swap A
with B
.Upvotes: 1
Reputation: 19
NAND gate is an universal gate; you can use it to make any other gate.
s' = nand(s,s)
Upvotes: 1