Digital-Logic-Sim icon indicating copy to clipboard operation
Digital-Logic-Sim copied to clipboard

[Possibly an optimisation?] Converting chips to truth tables.

Open someone1065 opened this issue 9 months ago • 3 comments

I believe I've heard somewhere that every NAND gate is handled separately. Why not add optional conversion of curcuit to a truth table that would be used internally? Any loops could in theory be handled by adding an invisible input/output pair that are unusable but connected.

E.g. D latch: Data | Store | Feedback1_in || Out | Feedback1_out -----+------+----------------+-----+----------------- 0 | 0 | 0 || 0 | 0
0 | 0 | 1 || 1 | 1
0 | 1 | 0 || 0 | 0
0 | 1 | 1 || 0 | 0
1 | 0 | 0 || 0 | 0
1 | 0 | 1 || 1 | 1
1 | 1 | 0 || 1 | 1
1 | 1 | 1 || 1 | 1

Or shortened truth table: Data | Store | Feedback1_in || Out | Feedback1_out -----+------+----------------+-----+----------------- X | 0 | 0 || 0 | 0
X | 0 | 1 || 1 | 1
0 | 1 | X || 0 | 0
1 | 1 | X || 1 | 1

If shortening, each output could also be given a separate truth table. (can't really show that with a D latch example.)

I hope the spacing doesn't get lost when I send this.

someone1065 avatar Apr 21 '25 09:04 someone1065