Electronic – Building “AND” and “OR” gates from tri-state drivers & inverters

digital-logicinvertertri-state

I'm working on a digital circuits assignment which asks me to prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit.

My attempt at doing so would be to create an "and" gate and an "or" gate, because "and", "or", and "not" are logically complete, if I'm correct.

My design for an "and" gate was to have two tri-state drivers, with two inputs (A and B) and they would come together with one output (C). "A" would be the selector for driver two and "B" would be the selector for driver one, then "A" would be the input for driver one and "B" would be the input for driver two, then the outputs of those drivers would come together at "C".

My concern is that this design leaves a "Hi-Z" in the truth table:

A | B | C

1 | 1 | 1

1 | 0 | 0

0 | 1 | 0

0 | 0 | Hi-Z

How would I go about fixing this? Or do I need a new design entirely?

Best Answer

The High-Z is a problem (unless you're doing wired-OR, which I think you're not).

To make an AND gate you need to implement this truth table:

B A  Out
0 0  0
0 1  0  
1 0  0  <--
1 1  1  <--

So suppose you connect A and /B to the input and tristate input of a buffer. That gives you the two last entries but the first two will be high-Z because /B is high. You'll need another tristate buffer tied to the first buffer, and the two cannot 'fight' nor can they both go high-Z at the same time. This should be enough of a hint.