Top "Boolean" questions

A Boolean data type is a data type with only two possible values: true or false.

Using bitwise operators for Booleans in C++

Is there any reason not to use the bitwise operators &, |, and ^ for "bool" values in C++? I sometimes run …

c++ boolean bitwise-operators
Is a bool read/write atomic in C#

Is accessing a bool field atomic in C#? In particular, do I need to put a lock around: class Foo { …

c# .net concurrency locking boolean
How to do a case with multiple conditions?

In the 1 month experience I've had with any programming language, I've assumed that switch case conditions would accept anything in …

java boolean switch-statement case
Is there XNOR (Logical biconditional) operator in C#?

I'm new to C# and could not find XNOR operator to provide this truth table: a b a XNOR b …

c# boolean boolean-operations
Boolean identity == True vs is True

It is standard convention to use if foo is None rather than if foo == None to test if a value …

python boolean jython cpython pypy
What's the most concise way to get the inverse of a Java boolean value?

If you have a boolean variable: boolean myBool = true; I could get the inverse of this with an if/else …

java boolean inverse
Generate Random Boolean Probability

I only know how I can generate a random boolean value (true/false). The default probability is 50:50 But how can …

c# .net random boolean probability
MySQL Boolean "tinyint(1)" holds values up to 127?

I wanted to make a true/false field for if an item is in stock. I wanted to set it …

mysql boolean tinyint
Default value of BOOL

What is the default value of a BOOL variable in Objective-C?

objective-c initialization boolean
Arduino HIGH LOW

I have an Arduino and I am wondering exactly what HIGH and LOW mean as far as actual values go... …

boolean arduino