Click to see the rest of Computational Logic section :
A variable data type that holds either a True or False value is known as a Boolean. In the same way, logic that we apply in our computers that return either a true or false value is known as Boolean Logic. You have likely already used these statements everyday without realising:
Is the value of x greater then the value of y?
Is the length of my name longer than 3 letters?
While I haven’t entered by password, don’t let me log in.
To help us understand Boolean Logic, we use a set of symbols to represent each logic statement. These are known as logic gates:
The AND and OR gates take in two values whilst the AND only takes in one. All logic gates only have one output.
Logic gates can be combined together to make more complex logic and later translated into a mathematical format known as Boolean Algebra. Whilst this may sound difficult, once you know the symbols, the same logic is applied.
For instance, the boolean expression Q = (A.B) + ( A.C) can be converted into a logic circuit that reads
Q is 1 IF
A is 1 AND B is 1
A is 1 AND C is 1
(note here, that . means AND and + means OR)
Find this page helpful? Share the love on your social media mentioning @TeachAllAboutIT and we’ll enter you in our monthly draw to win a gift voucher for any product on the site!