Boolean Logic

Computer Science: OCR A Level, topic 4.3.5

Defining Problems Using Boolean Logic

It is possible to describe the various outcomes of particular scenarios using boolean logic. The outcomes can then be interpreted using logic gates in an electronic circuit.

Example 1

Example 1

  • In order to pass an online course, students must achieve at least 75% in both assessments A and B.
Booelan logic

Booelan logic

  • When approaching a problem like this, truth tables help to identify the possible outcomes.
  • Whether or not a student passed can be expressed as:
  • P=A.BP = A.B
Example 2

Example 2

  • A reef supplement should be added if the calcium level drops below 400 ppm or the magnesium drops below 1300 ppm, and the temperature of the water is 24°C.
Booelan logic

Booelan logic

  • Whether or not the supplement is added can be expressed as:
  • D=(C+M).TD = (C + M).T

Test yourself on Boolean Logic

  • In order to pass an online course, students must achieve at least 50% in at least one of their two exams.
    Which of the following expressions describes whether or not a student passes the course?

Practise this topic for free