Search code examples
booleanboolean-logicboolean-expressionboolean-operations

Working with values of 0 and 1 (Boolean)


Is

f = a'ab;

the same as

f = 1

Is this possible? I got this when I was simplifying something.


Solution

  • If that's meant to represent (and I think this is the likely case):

    NOT-a AND a AND b
    

    then, no, it's false no matter the values of a or b. That's because one of a or NOT-a is definitely false, FALSE AND anything is false and the operation is associative: (a AND b) AND c == a AND (b AND c).

    If it's meant to represent:

    NOT-a OR a OR b
    

    then, yes, it's true no matter the values of a or b. That's because one of a or NOT-a is definitely true and TRUE OR anything is true. The associativity rules also apply here.