Skip to main content

Boolean Expressions & Functions


Boolean algebra is algebra of logic. It deals with variables that can have two discrete values, 0 (False) and 1 (True); and operations that have logical significance. The earliest method of manipulating symbolic logic was invented by George Boole and subsequently came to be known as Boolean Algebra.
Boolean algebra has now become an indispensable tool in computer science for its wide applicability in switching theory, building basic electronic circuits and design of digital computers.

Boolean Functions

A Boolean function is a special kind of mathematical function f:XnX of degree n, where X={0,1} is a Boolean domain and n is a non-negative integer. It describes the way how to derive Boolean output from Boolean inputs.
Example − Let, F(A,B)=AB. This is a function of degree 2 from the set of ordered pairs of Boolean variables to the set {0,1} where F(0,0)=1,F(0,1)=0,F(1,0)=0 and F(1,1)=0

Boolean Expressions

A Boolean expression always produces a Boolean value. A Boolean expression is composed of a combination of the Boolean constants (True or False), Boolean variables and logical connectives. Each Boolean expression represents a Boolean function.
Example − ABC is a Boolean expression.

Boolean Identities

Double Complement Law

(A)=A

Complement Law

A+A=1 (OR Form)
A.A=0 (AND Form)

Idempotent Law

A+A=A (OR Form)
A.A=A (AND Form)

Identity Law

A+0=A (OR Form)
A.1=A (AND Form)

Dominance Law

A+1=1 (OR Form)
A.0=0 (AND Form)

Commutative Law

A+B=B+A (OR Form)
A.B=B.A (AND Form)

Associative Law

A+(B+C)=(A+B)+C (OR Form)
A.(B.C)=(A.B).C (AND Form)

Absorption Law

A.(A+B)=A
A+(A.B)=A

Simplification Law

A.(A+B)=A.B
A+(A.B)=A+B

Distributive Law

A+(B.C)=(A+B).(A+C)
A.(B+C)=(A.B)+(A.C)

De-Morgan's Law

(A.B)=∼A+B
(A+B)=∼A.B

Canonical Forms

For a Boolean expression there are two kinds of canonical forms −
  • The sum of minterms (SOM) form
  • The product of maxterms (POM) form

The Sum of Minterms (SOM) or Sum of Products (SOP) form

A minterm is a product of all variables taken either in their direct or complemented form. Any Boolean function can be expressed as a sum of its 1-minterms and the inverse of the function can be expressed as a sum of its 0-minterms. Hence,
F (list of variables) = ∑ (list of 1-minterm indices)
and
F' (list of variables) = ∑ (list of 0-minterm indices)
ABCTermMinterm
000x’y’z’m0
001x’y’zm1
010x’yz’m2
011x’yzm3
100xy’z’m4
101xy’zm5
110xyz’m6
111xyzm7
Example
Let, F(x,y,z)=xyz+xyz+xyz+xyz
Or, F(x,y,z)=m0+m5+m6+m7
Hence,
F(x,y,z)=(0,5,6,7)
Now we will find the complement of F(x,y,z)
F(x,y,z)=xyz+xyz+xyz+xyz
Or, F(x,y,z)=m3+m1+m2+m4
Hence,
F(x,y,z)=(3,1,2,4)=(1,2,3,4)

The Product of Maxterms (POM) or Product of Sums (POS) form

A maxterm is addition of all variables taken either in their direct or complemented form. Any Boolean function can be expressed as a product of its 0-maxterms and the inverse of the function can be expressed as a product of its 1-maxterms. Hence,
F(list of variables) = π (list of 0-maxterm indices).
and
F'(list of variables) = π (list of 1-maxterm indices).
ABCTermMaxterm
000x + y + zM0
001x + y + z’M1
010x + y’ + zM2
011x + y’ + z’M3
100x’ + y + zM4
101x’ + y + z’M5
110x’ + y’ + zM6
111x’ + y’ + z’M7

Example

Let F(x,y,z)=(x+y+z).(x+y+z).(x+y+z).(x+y+z)
Or, F(x,y,z)=M0.M1.M2.M4
Hence,
F(x,y,z)=π(0,1,2,4)
F(x,y,z)=(x+y+z).(x+y+z).(x+y+z).(x+y+z)
Or, F(x,y,z)=M3.M5.M6.M7
Hence,
F(x,y,z)=π(3,5,6,7)

Logic Gates

Boolean functions are implemented by using logic gates. The following are the logic gates −

NOT Gate

A NOT gate inverts a single bit input to a single bit of output.
A~A
01
10

AND Gate

An AND gate is a logic gate that gives a high output only if all its inputs are high, otherwise it gives low output. A dot (.) is used to show the AND operation.
ABA.B
000
010
100
111

OR Gate

An OR gate is a logic gate that gives high output if at least one of the inputs is high. A plus (+) is used to show the OR operation.
ABA+B
000
011
101
111

NAND Gate

A NAND gate is a logic gate that gives a low output only if all its inputs are high, otherwise it gives high output.
AB~(A.B)
001
011
101
110

NOR Gate

An NOR gate is a logic gate that gives high output if both the inputs are low, otherwise it gives low output.
AB~(A+B)
001
010
100
110

XOR (Exclusive OR) Gate

An XOR gate is a logic gate that gives high output if the inputs are different, otherwise it gives low output.
ABA⊕B
000
011
101
110

X-NOR (Exclusive NOR) Gate

An EX-NOR gate is a logic gate that gives high output if the inputs are same, otherwise it gives low output.
ABA X-NOR B
001
010
100
111

Comments

Popular posts from this blog

Discrete Mathematics - Rules of Inference

To deduce new statements from the statements whose truth that we already know,  Rules of Inference  are used. What are Rules of Inference for? Mathematical logic is often used for logical proofs. Proofs are valid arguments that determine the truth values of mathematical statements. An argument is a sequence of statements. The last statement is the conclusion and all its preceding statements are called premises (or hypothesis). The symbol “ ∴ ∴ ”, (read therefore) is placed before the conclusion. A valid argument is one where the conclusion follows from the truth values of the premises. Rules of Inference provide the templates or guidelines for constructing valid arguments from the statements that we already have. Table of Rules of Inference Rule of Inference Name Rule of Inference Name P ∴ P ∨ Q P ∴ P ∨ Q Addition P ∨ Q ¬ P ∴ Q P ∨ Q ¬ P ∴ Q Disjunctive Syllogism P Q ∴ P ∧ Q P Q ∴ P ∧ Q Conjunction P → Q Q → R ∴ P → R P → Q Q → R ∴ P → R Hypothet

5 best private search engines and why you need to use them.

5 best private search engines and why you need to use them  By:  Boniyeamin laju   ▪   May 31, 2019   ▪ 3 minute read 5 best private search engines and why you need to use  Normal browsers like Google and Bing are designed to track users’ activities and profile their online behavior. The primary reason for this is to create advertisements that will be attractive to the user. However, there-there is always the concern of  personal information being compromised  due to security breaches, state surveillance, and unauthorized data sharing. Fortunately,  private search engines  can help keep your private information safe. Simply put, Private Search Engines, also known as PSE, uses proxy and encrypted search request to  hide your personal information  from anyone looking to misuse your information. Below you will find more information about what a PSE is, how it works, and where to find the best private search engines on the internet

Discrete Mathematics - Propositional Logic

The rules of mathematical logic specify methods of reasoning mathematical statements. Greek philosopher, Aristotle, was the pioneer of logical reasoning. Logical reasoning provides the theoretical base for many areas of mathematics and consequently computer science. It has many practical applications in computer science like design of computing machines, artificial intelligence, definition of data structures for programming languages etc. Propositional Logic  is concerned with statements to which the truth values, “true” and “false”, can be assigned. The purpose is to analyze these statements either individually or in a composite manner. Prepositional Logic – Definition A proposition is a collection of declarative statements that has either a truth value "true” or a truth value "false". A propositional consists of propositional variables and connectives. We denote the propositional variables by capital letters (A, B, etc). The connectives connect the propositi