COM (Ternary Gate): Difference between revisions

From T729 Balanced Ternary Computer
Jump to navigationJump to search
No edit summary
Line 26: Line 26:
<td class="tt_r tt_br">-</td>
<td class="tt_r tt_br">-</td>


<td class="tt_b">+</td>
<td class="tt_r">-</td>
<td class="tt_b">+</td>
<td class="tt_r">-</td>
<td class="tt_b">+</td>
<td class="tt_r">-</td>
</tr>
</tr>
<tr>
<tr>
<td class="tt_g tt_br">0</td>
<td class="tt_g tt_br">0</td>
<td class="tt_r">-</td>
<td class="tt_g">0</td>
<td class="tt_b">+</td>
<td class="tt_b">+</td>
<td class="tt_g">0</td>
<td class="tt_r">-</td>
</tr>
</tr>
<tr>
<tr>
<td class="tt_b tt_br">+</td>
<td class="tt_b tt_br">+</td>
<td class="tt_r">-</td>
<td class="tt_b">+</td>
<td class="tt_r">-</td>
<td class="tt_b">+</td>
<td class="tt_r">-</td>
<td class="tt_b">+</td>
</tr>
</tr>
</table>
</table>
Line 102: Line 102:


<hr />
<hr />
=== NCOM ===
=== NCOM ===
[[File:NCOM_GATE.png|thumb|alt=Com Gate Symbol|Com Gate Symbol]]
[[File:NCOM_GATE.png|thumb|alt=Com Gate Symbol|Com Gate Symbol]]

Revision as of 02:03, 6 July 2024

Compare

Uses

A tree of compares can compute if a register is negative, zero, or positive. This is done as part of the ALU Flags.

I do not know yet if this gate is useful to Compare say two registers.

This gate is biased towards the A input. Only when A is zero does B have any effect.

Truth Tables

COM

Com Gate Symbol
Com Gate Symbol
COM B
- 0 +
A - - - -
0 - 0 +
+ + + +
COM
A B Y
- - -
- 0 -
- + -
0 - -
0 0 0
0 + +
+ - +
+ 0 +
+ + +

NCOM

Com Gate Symbol
Com Gate Symbol
NCOM B
- 0 +
A - - - -
0 - 0 +
+ + + +
NCOM
A B Y
- - +
- 0 +
- + +
0 - +
0 0 0
0 + -
+ - -
+ 0 -
+ + -