Top "Boolean-logic" questions

An algebraic system developed by George Boole.

Any good boolean expression simplifiers out there?

I was refactoring old code and encountered several IF conditions that were way too complex and long and I'm certain …

boolean-logic boolean-expression
pandas: multiple conditions while indexing data frame - unexpected behavior

I am filtering rows in a dataframe by values in two columns. For some reason the OR operator behaves like …

python pandas boolean-logic
How to test multiple variables against a value?

I'm trying to make a function that will compare multiple variables to an integer and output a string of three …

python if-statement comparison match boolean-logic
How to use boolean 'and' in Python

In C# we can use && (boolean and) like this: int i = 5; int ii = 10; if(i == 5 && ii == 10) { …

python boolean-logic
Easiest way to flip a boolean value?

I just want to flip a boolean based on what it already is. If it's true - make it false. …

c++ c boolean boolean-logic
How do I test if a variable does not equal either of two values?

I want to write an if/else statement that tests if the value of a text input does NOT equal …

javascript if-statement conditional-statements equals boolean-logic
Differences in boolean operators: & vs && and | vs ||

I know the rules for && and || but what are & and |? Please explain these to me with an …

java bitwise-operators logical-operators boolean-logic
How to convert "0" and "1" to false and true

I have a method which is connecting to a database via Odbc. The stored procedure which I'm calling has a …

c# .net asp.net odbc boolean-logic
Check if at least two out of three booleans are true

An interviewer recently asked me this question: given three boolean variables, a, b, and c, return true if at least …

java boolean boolean-logic
How can I obtain the element-wise logical NOT of a pandas Series?

I have a pandas Series object containing boolean values. How can I get a series containing the logical NOT of …

python pandas boolean-logic