Top "Boolean-operations" questions

Boolean algebra is the algebra of truth values 0 and 1. The operations are usually taken to be conjunction ∧, disjunction ∨, and negation ¬, with constants 0 and 1.

Simple boolean operators for bit flags

I am attempting to learn more about this to implement in my project. I currently have got this basically: unsigned …

c++ c boolean-operations bitflags
Boolean Algebra Simplification of (x'y'+z)'+z+xy+wz

How would you simplify the following? I'm having a bit of trouble with the first part with negation. How would …

boolean boolean-logic boolean-expression boolean-operations demorgans-law
Converting logic gates to a purely NAND implementation, how come this is valid?

So Im doing some exercises with answers provided on conversion to a purely NAND gate implementation. I understand how the 2 …

logic boolean-logic boolean-operations circuit
Can I use a boolean AND condition in a regular expression?

Say, if I have a DN string, something like this: OU=Karen,OU=Office,OU=admin,DC=corp,DC=Fabrikam,…

regex boolean-operations
DeMorgan's law and C++

For each of the following write the equivalent C++ expressions, without any unary negation operators (!). (!= is still permitted) Use DeMorgan's …

c++ boolean-expression boolean-operations demorgans-law
Boolean Matrix Multiplication in Matlab

Does Matlab have a Boolean (sometimes called logical or binary) matrix multiplication function? I'm specifically talking about what's usually denoted …

matlab matrix boolean matrix-multiplication boolean-operations
Replace least significant bit with bitwise operations

What is a optimal way to replace the Least Significant Bit of a byte, with a provided bit? I know …

binary bit-manipulation bit-shift boolean-operations
True + True = 2. Elegantly perform boolean arithmetic?

I have nested lists of truth values representing SAT forumlas, like this: [[[0, True, False], [0, True, False], [0, True, 1]], [[0, True, True], [2, True, …

python boolean boolean-operations
How to compare boolean vectors in R

I have a vector v and I want to find all those elements, that have values between 4 and 7. v = c(1:9) # …

r vector comparison boolean boolean-operations