Friday, 9 August 2019

digital logic - Output of XOR gate with high-impedance input


One of the exercises in university was to output a truth table for the gate, which takes an input


t, and returns


t ^ t, where ^ is a xor gate.


Now if t = 1 or t = 0, the output is always 0. Furthermore, even if the input is t = X (don't know), the output is still 0.


What I am not sure is the answer in case an input is Z (high impedance).


My guess would be that the output is also Z, because the output wire is not driven by anything. Could anyone confirm / deny this?


Also, any other examples using other gates (such as AND / OR) and Z values would be appreciated.



Answer



To answer your actual question, no, the output of a gate is never "Z", unless it's specifically designed as a tristate gate with an output enable.



In general, inputs to gates that are "Z" are treated the same as "X", and the output is either "0", "1" or "X" as appropriate.


For the specific case of the XOR with its inputs tied together, your original statement that input "X" gives output "0" is correct — although many simple-minded logic simulators get this wrong. The problem is that they can't distinguish between two inputs being the same unknown value versus two independent unknown values.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...