teach-ict.com logo

THE education site for computer science and ICT

3. Representing Logic

Depending on how you want to use the operations, there are several ways of describing them. These are:

  • Logic diagrams
  • Algebra
  • Truth tables

Logic diagrams

Logic diagrams, or logic circuits, are like flowcharts. They allow the user to visually trace the exact path of logic from initial input to ultimate output.

They look like this:

NOT gate

Algebra

Algebra is very useful for giving a condensed summary of a logical expression. Boolean algebra uses specific notation for particular logic gates. The following is an example of a Boolean algebraic expression:

$$Q = A.B + \overline{(C+A+F)} + \overline B + C$$

 

Truth tables

Truth tables are useful for seeing the spread of all possible results. They are a table with a column for each input and one for the output. They have multiple rows, showing all possible outcomes. They look like this:

 

Input A

Input B

Output Q

0

0

1

0

1

0

1

0

0

1

1

0