What is Boolean?

Konfinity
January 5,2021 - 4 min read
What is boolean?

In computer science, Boolean deals with equations and their Boolean values, that is, true or false. The concept of Boolean is named after its inventor George Boole. He has also played an instrumental role in the development of computers and is also known as one of the founders of computer science. Boolean Algebra consists of a set with two or more than two elements but the variables and functions take only two values i.e., 1 or 0. These values represent true or false, 1 can be referred as true and 0 as false.

A Boolean Algebra mainly deals with three operations. These operations are AND (Boolean Product), the OR (Boolean Sum), and the NOT (Complement). In this blog, we would understand the concept of Boolean in detail, its operations and practical usage in the word of computers.

Let’s understand Boolean algebra and its operations with the help of some statements. If the example statement. “I will enrol in a Konfinity course if I want work in my dream company or get a high paying job.”

In the example above, the proposition ‘I will enrol in a Konfinity course’ will be true if either of the propositions ‘work in my dream company’ or ‘get a high paying job’ are true. The proposition ‘I will enrol in a Konfinity course’ will be false only if both of the propositions ‘work in my dream company’ and ‘get a high paying job’ are false. We could then also make our statement more complex by saying: “If I am really eager, I will enrol in a konfinty course if I want to work in a dream company or get a high paying job in any company.”

These propositions and their outputs under certain conditions are best represented as truth tables. A truth shows the output for each possible combination of various inputs. The inputs and outputs are generally represented by 0 and 1 in a truth table.

You can also define the above statement with the help of a truth table. As of now, let’s understand all the Boolean operators.

Boolean Operators

There are only three types of operators used in Boolean algebra, "AND", "OR" and "NOT". These operators form the basis of Boolean algebra in computer science. They are used to evaluate the Boolean expressions and produce the desired results according to the operator applied. Let us look at and comprehend each one of the operators separately.

The first one is the AND operator. This operator tells the database that all the conditions must be met for the item to appear in the output list. A good example of the AND operator is when you search for a Levis t-shirt on your favourite e-commerce website, the results that come satisfy both the conditions, that is, it should be a t-shirt and it should be from the company Levis.

The next in line is the OR operator. In this operator, only one or at least one of the conditions should be met so that the item is present in the present list or is ‘true’. For example, if you type web development OR web design course, your results will include either courses but not necessarily courses which include both.

You can say that the OR operator broadens a search because any of the words it connects are acceptable and the AND operator, on the other hand, narrows or restricts a search because both or all conditions have to be met.

The last operator in list is the NOT operator. This operator eliminates all terms that are mentioned in the condition. The NOT operator is particularly useful when you want to remove some particular points or exclude a certain type of products.

Boolean Expressions

Boolean expressions are expressions used in programming languages that produce a Boolean value upon evaluation. The final output of these expressions is either true or false. When evaluating an expression, Boolean operations have a particular order in which they are carried out. Starting from the highest preference, the order is, NOT, AND, OR. However, if anything appears inside brackets, the normal mathematical rules are applied and hence it is always carried out or evaluated before anything else. The symbol for AND operator is ‘&’, symbol for OR operator is || and the symbol for NOT operator is a horizontal line above the variable.

Laws of Boolean

Now that we have understood the basic concepts of Boolean in computer science, it’s time we discuss the basic Laws of Boolean Algebra.

The first one is the Commutative Law which allow a change in position for addition and multiplication and the Associative Law that allows you to remove brackets for addition and multiplication and Distributive Law by which you can factorise an expression. These Boolean laws are the same as in ordinary algebra.

Each of these Boolean Laws are given with one or two variables, but there can be an infinite number of variables as inputs too for the expression. The Boolean laws we just discussed can be used to prove any Boolean expression. These laws can also be used for simplifying complicated digital circuits.

There is a brief description of the various Laws of Boolean given below. In these examples, ‘A’ represents the variable input. In these examples, we have represented the AND operation with ‘.’ And the OR operation with ‘+’.

  1. Annulment Law
    A . 0 = 0

    If there is AND operator between a variable input and 0, the output will always be 0.

    A + 1 = 1

    If there is OR operator between a variable input and 1, the output will always be 1.

  2. Identity Law

    In identity law, the output will always be equal to the variable input. A variable input and an OR operator with a “0” or AND operator with a “1” will always be equal to that term or variable input. For example,

    A + 0 = A

    A, being the variable input, and an OR operator with 0 is always equal to the variable.

    A . 1 = A

    A, being the variable input, and an AND operator with 1 is always equal to the variable.

  3. Idempotent Law

    Idempotent law says that a variable input that uses AND operator and OR operator with itself is equal to that input.

    A + A = A

    A variable with an OR operator with itself is always equal to the input variable.

    A . A = A

    A variable with an AND operator with itself is always equal to the input variable.

  4. Complement Law

    A complement of input means the opposite, that refers to everything other than the input variable.

    Complement law means that an input with AND operator with its complement equals “0” and an input with OR operator with its complement equals “1”.

    A . A’ = 0

    A variable AND its complement are always equal to 0.

    A + A’ = 1

    A variable OR its complement is always equal to 1

  5. Commutative Law

    Commutative law in Boolean algebra means the same way as it does in mathematics. The commutative law says that the order of application of two terms is not important and the irrespective of the order of the application of input, the output remains the same.

    A . B = B . A

    The order in which there is an AND operator between two variables makes no difference

    A + B = B + A

    The order in which there is an OR operator between two variables makes no difference

  6. Double Negation Law

    Double Negation Law means that a term that is inverted twice becomes equal to the original term or the input.

    (A’)’ = A

    A double complement of the input variable is always equal to the original variable.

  7. de Morgan´s Theorem

    In “de Morgan´s” theorems, there are two laws or rules.

    The first one is that when there is a NOR operator between two separate terms, it is the same as the two terms inverted or complemented and then the AND operator is applied between them. for example:

    A’+B’ = A’ . B’

    The second law is that there is a NAND operator between two separate terms is the same as the two terms inverted or complemented and then the OR operator applied between them. for example:

    A’.B’ = A’ + B’

If you have reached here reading the entire article, I’m sure you are well versed with the concept of Boolean algebra in computer science. We have covered the basics of Boolean algebra, Boolean expressions and the basic Boolean operations. In the world of computing, Boolean algebra holds much importance. It is of significance to probability, geometry of sets, and also information theory. Along with it, Boolean Algebra also constitutes the basis for the design of circuits used in modern electronic digital computers.

Now that you are well versed with one of the most important basics of computers, that is, Boolean algebra, it is time you take one step ahead and learn one or two advance skills of technology. One of the most prosperous sectors of the IT industry is that of web development. If you are unaware, you can learn more about web development and why you should learn it in this blog. The business of making websites is in demand and hence it’s extremely tough and competitive to get a job as a developer. Nonetheless, we have a solution for you!

One of the best ways to polish your skills as a web developer is to take guidance from industry professionals. There are a variety of courses available out there on the world wide web and when it comes to picking up the right course, you are spoilt for choice! However, the course you choose should compel you to make projects that are industry relevant and makes for a good portfolio. If the course you enrol in meets all these conditions, then you should really go for it as it would really help you grab a job as a developer in your dream company.

One such course that helps you make a luvrative career is Konfinity’s Web Development Course This course is a well-researched training course developed by experts from IIT DELHI in collaboration with tech companies like Google, Amazon and Microsoft. It is trusted by students and graduates from IIT, DTU, NIT, Amity, DU and more.

We encourage technocrats like you to join the course to master the art of creating web applications by learning the latest technologies, right from basic HTML to advanced and dynamic websites, in just a span of a few months.

Konfinity is a great platform for launching a lucrative tech career. We will get you started by helping you get placed in a high paying job. One amazing thing about our course is that no prior coding experience is required to take up our courses. Start your free trial here.

Chat with us on WhatsApp