Menu
Log in

Computer Engineering Concepts

6.1 Boolean Variables and Functions

Variables that can have only two states are called Boolean variables. The two states are represented as 1 and 0. A logical proposition, an on-off electrical state, and a binary digit are all examples of quantities that can be represented as a Boolean variable. The variable itself can be represented using a letter like x. This approach is identical to the concept of a variable used in regular algebra where a variable can assume a value. The idea of a variable in Boolean algebra is limited when compared to a variable in regular algebra. A variable in regular algebra can be assigned one out of an infinite set of numbers. In the case of a Boolean variable, the variable can be assigned one out of a set of two numbers [1 and 0]. The study of the relationships that exists between Boolean variables is called Boolean algebra. Due to the nature of Boolean variables the rules or theorems of this algebra turn out to be different from those of normal algebra. Even though the rules are different, there are a lot of similarities between the rules of operations.

A Boolean variable with the opposite state is called the complement, and it is represented as. In this text we will use the first representation. For example, if the state of a Boolean variable A =1, then A’=0 or if the Boolean variable b = 0, then b’=1.

A Boolean operator is an operator that performs a function on Boolean variables to produce a result that is within the set of two numbers or states. This again is similar to mathematical operators like addition, which acts on an integer set of numbers. For example, the addition(+) arithmetic operator in the form X+Y=Z fits this idea of an operator described earlier because it takes two numbers and performs an operation that produces a result in the number set. The logical operator AND can be thought of as an example of a Boolean operator because it will act on two Boolean variables to produce a result that is also Boolean. The “AND” logical operator expressed generally as a Boolean operator is represented using a dot ( . ), similarly the logical operator “OR” is represented using a plus sign ( + ). The symbols used are identical to the mathematical symbols of multiplication and addition, but are NOT identical in terms of the result or outcome. So, care should be taken to avoid thinking of Boolean operators as arithmetic operators; the + sign used in a Boolean context represents OR, and the +sign used in an arithmetic context represents addition. The context of the operator symbol’s use determines the nature of the operator. The reason why the same symbols are used is because of the similarity of the outcomes. For example compare the following operations on binary digits:


The result pattern in both cases is similar, but not the same. The arithmetic addition operator is not a Boolean operator because the last result or outcome is not a Boolean quantity of either 1 or 0. Now comparing the ( . ) operator:


Here the pattern for mathematical multiplication and the pattern for Boolean OR turns out to be identical. Due to the similarities the symbols from mathematics are used to describe Boolean operators, hopefully making it easier to remember.

Now if x and y are Boolean variables, then x + y and x  . y will produce results based on the actual values of the variables and the definition of the operator. In this case, since both x and y are Boolean variables each variable can have two possibilities for a total of four possible combinations. The outcomes for all four possibilities are shown below for both Boolean operators.


Note: this is essentially a truth table.

The AND Boolean operator symbol ( . ) is usually omitted and written as x y. So, when the operator symbol between variables is missing it is assumed to be an AND operator. This is similar to arithmetic where the lack of an operator between variables implies multiplication.


6.1 Practice Questions

1.     Using truth tables determine the results of the following Boolean functions.

        a.  (x + y) . y                b.  (x + y) . x             c.   (x . y) + x    d. (x + y) + y

2.     What is the definition of a Boolean variable and what are some examples of it?

3.  Represent the NAND (­) Boolean operator using + and . operators.



GlobalEduTech Solutions

Powered by Wild Apricot Membership Software