Logic šŸ˜

Cheers!

Thanks for the details on the terminology :grin: Have you ever heard of 16 value logic?

No, but Iā€™ve certainly seen logic with 0 valueā€¦

6 Likes

Iā€™ve seen 3-valued (true, false, uncertain) and 4-valued (true, false, unknown, donā€™t care), but never 16-valued. Though, if someone wanted to write out the exponentially-growing list of logic operations for all possible inputs, I suppose thereā€™s no reason it couldnā€™t be generalized to n values.

Could you be referring to a truth table of 4 variables with 2^4=16 rows?

1 Like

Sorry, I mean the 16 binary logic operators. Some of them are:

AND
OR
NOR
NAND
XOR
MATERIAL EQUIVALENCE
IMPLICATION
TRUE
FALSE
P
Q
~P
~Q

Gives the full list.

2 Likes

Ahh, now I know what you are referring to. And yes, Iā€™m familiar with them, though mostly in the context of digital circuit design ā€“ which mainly only uses NOT, OR, NOR, AND, NAND, EQ, NEQ, XOR, and XNOR. Fun trivia fact: all of those operations (i.e., all 16 binary ops) can be implemented using only NAND (or NOR) operations. Hence the reason that most logic chips (i.e., processors) are just complicated collections of NAND gates.

3 Likes

I set up all 16 with nand gates on minecraft :-D. Yup just a few weeks ago I proved nor gates worked as well to a coworker :japanese_ogre:

3 Likes

I have used FPGAs where the basic logic cells were 8:1 multiplexers. You could make all the three input logic functions simply by putting the truth table on the 8 inputs but you could also feed other logic into the inputs to make more complex functions. A pair could make any type of flip flop. It worked out very efficient.

2 Likes

What were the three functions? AND OR NAND?

Three inputs select which of another 8 inputs is routed to the output. So by putting 0 or 1 on each of the 8 inputs you can provide the truth table for any boolean function of three variables. I.e. all 256 possible functions, including AND, OR, NAND, NOR, XOR of three inputs with any of the inputs inverted.

1 Like

Wow all the functions for three (P, Q, R). Dang that is cool!

Plus some wider ones. For example you get a 4 input AND by setting the first 7 data inputs to zero and eight one to the 4th AND input.

You didnā€™t need to think about it as you can just write in VHDL and let the compiler map the logic to the cells.

2 Likes