close
Cart icon
User menu icon
User icon
Lightbulb icon
How it works?
FAQ icon
FAQ
Contact icon
Contact
Terms of service icon
Terms of service
Privacy policy icon
Privacy Policy
Zdjęcie główne artykułu.

Boolean algebra in Layman’s Terms

What it is

Boolean algebra is a branch of mathematics. More specifically, it's a branch of algebra - as the name suggests.

Let's skip the long introduction and complicated explanations. Since we promised to explain this topic in simple words, let's get straight to the point.

The main concept

Imagine a situation like this: you have only two digits 0 and 1. What can you do with these two digits? Despite appearances, a lot. These two digits are the foundation of all computer science. They are the cornerstone of what we know as the binary system.

Boolean algebra plays an important role in this domain. Thanks to it we can perform various operations on values built from zeros and ones. Let us now take a closer look at some operations.

Negation (also known as NOT)

As the name suggests it is an operation that results in the opposite value.

Let's take a look at an example. We have a value equal to 1. If we perform a negation on it we get the value 0. It can't be any other digit as in the binary system you have only zeroes and ones available. Sometimes you may encounter this form of notation:

NOT(1) = 0
NOT(0) = 1

We perform negation on the value 1 and we get 0. We perform negation on the value 0 and we get 1. There are no other possibilities here. Negation is therefore the simplest possible operation. We just replace zero with one or vice versa.

Alternative (also known as OR)

To perform the operation known as an alternative you need two values - these will be various combinations of zeros and ones. Let's take a look:

0 OR 0 = 0
1 OR 0 = 1
0 OR 1 = 1
1 OR 1 = 1

You can read it in the following way:

0 or 0 gives us 0
1 or 0 gives us 1
0 or 1 gives us 1
1 or 1 gives us 1

A conclusion could be drawn here which makes it easier to remember these combinations. If there is a 1 on either the right or left side of OR then the result of the operation is 1. The same if you have 1 on both sides. On the other hand, you get a result of 0 if you have 0 on both sides of OR.

Conjunction ( otherwise known as AND)

Conjunction can be written like this:

0 AND 0 = 0
1 AND 0 = 0
0 AND 1 = 0
1 AND 1 = 1

We can describe the operations in this way:

0 and 0 gives us 0
1 and 0 gives us 0
0 and 1 gives us 0
1 and 1 gives us 1

Here, the set of possible outcomes is slightly different than for the operation of alternative. Note that you get the result 1 only if you have ones on both sides of AND. All other combinations result in 0.

Example - negation operation on a binary number.

We will now try to perform a simple operation on a binary number ( a number written using a combination of zeroes and ones). Our number is 101. It's worth mentioning that it's 5 in the decimal system.

Let's perform a negation. We need to negate all the digits one by one that make up our number:

NOT(1) = 0
NOT(0) = 1
NOT(1) = 0

The result is a new binary number 010. This is just a simple example to show what exactly is the basic idea behind Boolean Algebra.

Practical applications

All of this has precise, practical applications. Even greater than it might seem at first glance.

You probably already know that computers and all digital electronics are based on the binary system. And wherever we have a binary system, there is some element of Boolean Algebra in it. Think about the devices that surround you. From your laptop to your microwave oven. From your smartphone to your smart light switch.

While you won't need knowledge of negation or conjunction to use these devices, it may come in handy while programming.

Writing code for microcontrollers or various kinds of "smart" devices is often done in a "low-level" way. This kind of programming requires defining operations on binary values manually. In practice, this means using the methods we discussed earlier. So there are situations that will require the programmer to know such methods as negation, conjunction or alternative.

Want to learn more?

In this article we could introduce only a small part of this important and wide subject. If you want to learn more about binary numbers and operations such as negation or conjunction, you are welcome to join our Number Systems course. You will find there not only a compact theory but also dozens of exercises and assignments.