Isaac Turner About Projects CV Contact Resources Freode Boolean Logic Intro Primary Operators Primary Operator Qs Secondary Operators Expression Forms Expression Form Questions Algebraic Laws Algabraic Laws Questions Boolean Logic AppletWeb Security

Boolean Logic - Primary Operators

In boolean logic, operators perform operations on arguments, returning some boolean value. Unary operators perform an operation on one argument, binary operators perfom an operation on two arguments. All operations in boolean logic can be written with only the primary operators: AND, OR, NOT.

NOT

Not is the only unary operator in boolean logic. It negates (or swaps) the value of its argument, also known as inverting.

Differrent NOT operator notation:

  • a'
  • ~a
  • NOT a

Truth table for the NOT operator:

a~a
01
10

AND

AND is one of two primary binary operators in boolean logic, the other being OR.

Different AND operator notation:

  • a . b
  • a n b
  • a /\ b
  • a AND b

Truth table for the AND operator:

aba . b
000
010
100
111

OR

OR is one of two primary binary operators in boolean logic, the other being AND. The OR operator is true if one or both of its arguments are true.

Different OR operator notation:

  • a + b
  • a u b
  • a \/ b
  • a OR b

Truth table for the OR operator:

aba + b
000
011
101
111

Operator Precedence

Operator precedence is the order in which operations are carried out. In boolean logic operator precedence goes: NOT, AND, OR. Here are some examples:

  • a . b + c |=| (a . b) + c
  • b + c . d |=| b + (c . d)
  • a . ~b + c |=| (a . (~b)) + c

Introduction | Primary Operator Questions >>