I've been looking at logic gates, boolean expressions and Karnaugh maps.

I ran into a question regarding whether it was possible to implement all logic functions using only one logic gate: an OR gate where the B input is inverted.

I've devised the truth table for this, as follows:

a b out
0 0 1
0 1 0
1 0 1
1 1 1

I've also created the Karnaugh map for it and the boolean expression.

I've also attempted to create a few logic functions using the gate.

Can anyone point me in the right direction as to what method is best for determining whether this specific gate (or any gate, for that matter) can implement all/any of the logic functions, either through the use of Karnaugh maps, truth tables or boolean expressions (or any other method that would help me solve this)?



(Note in passing that this is exactly the truth table for $b\to a$).

Hint: if that is the only gate you have, can you create any function that returns 0 when all its inputs are 1?


Your gate implements $b\to a$. If you are allowed to have an additional input of $0$, then you get $\neg$, then $\lor$ and $\land$. Without such help, you cannot creat $\neg a$; from a single input $a$ you obtain only $a$ and $1$.


For clarity, inputs are in capitals (A, B). the internal signals are (a,b) and signal b is the inverse of B.

What happens when you tie A LOW, and input to B?
a B (b) out
0 0 (1) 1
0 1 (0) 0 Output is NOT (ie. inverse) of B.

So, if you tie A LOW, you get... an Inverter.
If you set up one such gate as an inverter, then fed the B input of a second such gate, the inverters would cancel out and you'd be left with... a standard OR gate.
If you put a third such gate, again as an inverter, on the output, you'd get... a NOR gate.

A NOR gate is the same as an AND gate with inverted inputs. A fourth and fifth "do everything" gate, on the inputs and acting as inverters, would make the whole lot... an AND gate.
And a sixth inverter on the output gives you... a NAND gate.

You now hav NOT, OR, NOR, AND, and NAND. From these, you can build any other logic circuit, including the Exclusive-OR. I'll leave that to you as an exercise.

  • $\begingroup$ Note: I have assumed you meant "implement all logic functions using one TYPE of logic gate". $\endgroup$ – Alan Campbell Nov 9 '14 at 0:12
  • $\begingroup$ This was really helpful, thanks! So your approach here is to create one of the universal gates, and if you can do that, you can safely assume you can implement all logic functions? I'm a computing student, so i'm having a hard time understanding some of the terms used here (i.e. signals, tie, LOW), but I understood the gist. Is there some sort of "formula", per se, to follow when creating a logic circuit? For e.g. if I wanted to create a NAND gate from the 1 gate I have, what would be the process involved? At the moment it's all trial-and-error for me! $\endgroup$ – Dejan Lukić Nov 9 '14 at 0:14
  • $\begingroup$ @DejanLukić I think some pretty pictures would help, but my drawing skill are lousy. I'll try to rustle up some KICAD screen captures and add them to the answer for more clarity. Wish me luck. $\endgroup$ – Alan Campbell Nov 9 '14 at 0:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.