Top "Boolean-logic" questions

An algebraic system developed by George Boole.

Why does (0 < 5 < 3) return true?

I was playing around in jsfiddle.net and I'm curious as to why this returns true? if(0 < 5 < 3) { alert("…

javascript compare operators boolean-logic
Converting rgba values into one integer in Javascript

I can already convert 32bit integers into their rgba values like this: pixelData[i] = { red: pixelValue >> 24 & 0xFF, …

javascript bit-manipulation boolean-logic
Logic to test that 3 of 4 are True

I want to return True if and only if 3 out of 4 boolean values are true. The closest I've gotten is (…

boolean-logic
C# How do I check if one of two values is TRUE?

Should be a simple question for the C# experts here. I basically want to check if one value or another …

c# boolean-logic
Is there a more elegant way to express ((x == a and y == b) or (x == b and y == a))?

I'm trying to evaluate ((x == a and y == b) or (x == b and y == a)) in Python, but it seems …

python boolean-logic
What is the maximum number of inputs for any logic gate?

In the references that we use, I usually see either a 2 or 3-input logic gate. Four-input gates come by once …

logic boolean-logic digital-logic
How do you express Boolean negation in Scheme?

In C and C++, the ! negates the result: if( !( a == b ) ) In Scheme, I found only eq?. How do I …

scheme boolean-logic
Logic Evaluator in c# (Evaluate Logical (&& ,|| ) expressions)

In my project there is a Logic evaluation section, it take input as a string which contains logical expressions (true/…

c# linq boolean-logic logical-operators dynamic-linq
What is an appropriate data structure and database schema to store logic rules?

Preface: I don't have experience with rules engines, building rules, modeling rules, implementing data structures for rules, or whatnot. Therefore, …

database boolean-logic rule-engine
Reverse of the logical operator AND (&)

a + b = c c - a = b Ok, now a & b = c c ?? a = b which operator replace "??" ? Thanks

logical-operators boolean-logic