Questions tagged [tri-state-logic]

For the time being, tri-state-logic may refer to logic circuits with at least one output adding a third, "high impedance" state (Z) to the binary "low" (0) and "high" (1) states as well as other contexts adding a third alternative.

In logic circuit implementation, tri-state refers to outputs/buffers that add a third, high impedance state, often denoted Z, to the binary low and high states.
In specification/design, a truth table may show don't care entries in addition to 0 and 1, conventionally denoted by a ×. As an example, an adder for two binary coded decimal digits does not need a specific output value for one input 1011 (11), as that is not a valid BCD code.

29 questions
28
votes
8 answers

How can I get angular.js checkboxes with select/unselect all functionality and indeterminate values?

I am looking for something exactly like these (tri-state checkboxes with "parents"). But using that solution wouldn't be elegant, as I do not depend on jQuery right now, and I would need to call $scope.$apply to get the model to recognize the…
Janus Troelsen
  • 20,267
  • 14
  • 135
  • 196
13
votes
2 answers

How can we deal with NULL values that have specific meanings?

Issue I'm trying to save a boolean value to elasticsearch, but it is specifically valid for it to be NULL. A sort of don't-care in this case. There seem to be several options, but it is not completely clear what the best would be. We are using…
Nanne
  • 64,065
  • 16
  • 119
  • 163
12
votes
5 answers

What's the best way to implement a single tri-state checkbox within angularjs?

Is there a simple way to place a single tri-state checkbox on a web-page and bind it to a boolean model so the latter can take true, false or null values? The closest solution I found so far is http://jsfiddle.net/HB7LU/454/ but it has a flaw when…
user32412
  • 123
  • 1
  • 4
7
votes
4 answers

Tristate values -- is there a convention?

I've been thrown a bit of a poser, and I'm not sure what the answer is. Basically - is there a convention for what values to use in tristate data-types? Doing some googling around, it doesn't look like there is: I've seen: -1 = False, 0 = Not…
Chris J
  • 30,688
  • 6
  • 69
  • 111
3
votes
2 answers

Set Indeterminate state with mouse in CheckedListBox

I need some assistance and I'm beating my head against the wall. I have an application that uses a tri-state CheckedListBox. I use the three states for specific purposes: Checked means tech performed an action Unchecked means the tech didn't perform…
TxDeadhead
  • 43
  • 1
  • 6
3
votes
1 answer

How to implement a tri state button using Qt

I need to create a button which has three states: unclicked intermediate clicked The logic I want to implement with this button is that whenever this button is clicked, I want the system to go to the intermediate state and wait for an event. In…
lferasu
  • 185
  • 2
  • 10
2
votes
2 answers

Tristate buffers in Quartus II

I need to clear up a problem with an external input to a CPLD by putting it through a tristate buffer. I know Quartus II has a tristate-buffer megafunction, but I am curious - if I simply tell it to output Z on the specific pin, will in…
shieldfoss
  • 886
  • 2
  • 12
  • 22
2
votes
1 answer

Can I avoid opt_merge from removing a BUF? (Yosys tri-state workaround)

I know yosys has limited tri-state support, but I'm looking for a possible workaround. The following circuit: module TBUF2 ( inout SALIDA1, inout SALIDA2, input OE, output C); assign SALIDA1=OE ? 1'b0 : 1'bZ; assign SALIDA2=OE ? 1'b0 : 1'bZ; wire…
1
vote
2 answers

Does system C support tri-state logic?

Does System C support tri-state logic? That is, bits that can get 0, 1 or X, where X means "unknown"? If it does, does it also support vectors that can contain Xes, including logic and arithmetic operations?
Nathan Fellman
  • 122,701
  • 101
  • 260
  • 319
1
vote
1 answer

How to set tri-state on NI-DAQ using C#

I have a NI-DAQ 6212 & I am trying to set the digital output in tri-state mode using C#. I am not able to find an example on how to set it aside from this reference http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/bd33b0d/ How…
kasrus
  • 13
  • 4
1
vote
0 answers

How to make my code to tri-state checkbox treeview?

I need to do a tri-state treeview checkbox but so far, I only able to make it to two state which are: if all child checked, parent checked. if partial child checked, parent did not check. But I wanted to make it if partial child checked, parent…
SK Sunny
  • 43
  • 7
1
vote
1 answer

inout signal doesn't change in simulation

Let's say I have an entity called "HostToDevice" which has a "ps2c" inout signal (VHDL). In this entity I only set this signal to 'Z' (high impedance) because I want an other entity to control it. I created a test bench to check the behavior and…
HBv6
  • 3,487
  • 4
  • 30
  • 43
1
vote
1 answer

In Verilog, how to "hold" the value of the rest of a register while modifying a single bit?

In Verilog HDL, how can I enforce that the rest of a register file to be untouched while I'm modifying a single bit? Like in the following example, reg [31:0] result; reg [31:0] next_result; reg [4:0] count; wire done; //some code here... result…
William Huang
  • 145
  • 1
  • 3
  • 6
1
vote
1 answer

How can I make clicking on a QTreeView partially checked node uncheck the node?

I have a QTreeView populated by a QAbstractItemModel subclass, allowing leaf nodes to be checked by the user. If a proper subset of the descendant leaf nodes of a non-leaf node are checked, then that node is partially checked (Qt::CheckStateRole is…
ecatmur
  • 152,476
  • 27
  • 293
  • 366
0
votes
1 answer

Unexpected behaviour in tristate switch VHDL

I have discovered an unexpected problem with a tristate driver developed in VHDL. The behavior of the tristate driver is not understandable in the simulation. Please have a look at the following code snippet where the signal line_en is…
hendrik2k1
  • 41
  • 1
  • 8
1
2