Three inverters from two
You have three inputs, a, b and c, each 0 or 1. You may use unlimited AND gates and OR gates but only two NOT gates.
Build a circuit with three outputs equal to NOT a, NOT b and NOT c. Explain the idea; the exact wiring can be given as boolean formulas.
Show a hint
Do not try to invert the inputs one at a time. Use the two NOT gates on two cleverly chosen quantities that summarise how many inputs are 1: "at least two are 1" and "an odd number are 1".
Your answer
Solving needs a free account
Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.
Discussion
Sign in to join the discussion · reading is open to everyone
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.
Related questions
The airplane on a treadmillAli and the eight loavesTwice as old as you were when I was your ageThe average speed that cannot be reachedDropping a ball inside a moving train
All questions →