teach-ict.com logo

THE education site for computer science and ICT

1. Introduction to Boolean Logic

Logic is a branch of mathematics used heavily in computer science. In particular, Boolean logic, named for the mathematician George Boole, which allows for logic expressions and calculations.

 

There are two states in Boolean logic - True and False. No matter how complicated the expression or calculation, the result will always be either True or False.

 

Consider the painful experiment below (don't try this at home!):

'If I stick my finger in boiling water then I will burn my finger'.

Is this a True statement?

You work out the truth of this statement by applying some known rules such as:

Rule 1: I am human
Rule 2: Human fingers are harmed by contact with boiling water

Therefore the two rules are applied one after another. 'I am human' (True), 'I've
stuck my finger in boiling water (True) therefore (logically) my finger will be burnt

A CPU

It is very important to note that normal logic does not have anything in-between, there is no 'slightly true' or 'slighty false' result.