±«Óătv

Boolean logic

A computer is basically a collection of and . These components have two states:

  • on - a current is flowing through the component
  • off - a current is not flowing through the component

These two states can easily be represented by using :

  • 1 = on (TRUE)
  • 0 = off (FALSE)

logic can be used to check if the values of different states are the same or different when compared. When George Boole was studying mathematical theories, he discovered a relationship between algebra and logic. This led to the idea that by comparing different states using three main , this would always output a true or false value. This later became known as a Boolean .

The three main types of condition are:

  • AND
  • OR
  • NOT