Evaluating Expressions

Computer Science: OCR A Level, topic 4.3.4

Evaluating Expressions

Logic gates can be combined to form logic circuits that process complex logical statements such as A AND (B OR C).

Evaluating boolean expressions

Evaluating boolean expressions

  • To evaluate a boolean expression, you should substitute all of the values in for the variables and then use the definitions of the different boolean functions to simplify it one step at a time.
Order of evaluation

Order of evaluation

  • You should evaluate any expression in brackets first, for example:
  • NOT(True OR False).
  • NOT(True).
  • False.
Truth tables

Truth tables

  • Another method of evaluating an expression is using a truth table.
  • A truth table shows every possible combination of inputs and the resulting output.
  • The truth table shows the input and output state for each combination.
  • The table can then be used to look up the output.

Test yourself on Evaluating Expressions

  • What is the value of True AND NOT(False)?

  • What is the value of NOT(False AND NOT(False))?

Practise this topic for free