Monday, December 3, 2018

Boolean Algebra (Basic Laws, POS and SOP expressions)




What is Boolean Algebra?

}  Boolean Algebra is the mathematic representation of operation of logic gates (and digital circuits).

}  Boolean Algebra has variables (input and output) and operators (AND, OR Complement).

}  Operation of a logic gate (and digital circuit) can be represented using a Boolean function. Truth table is used to illustrate the results of a Boolean function.

SOP and POS expressions

}  There are two types of boolean expressions

◦     Sum of Products (SOP) expressions

◦     Product of Sums (POS) expressions

 

}  SOP expression

◦     A product term is produced when one or more boolean variables are logically multiplied. It is also called minterm. When two or more product terms are logically added a SOP expression is formed.

 

}  POS expression

◦     A sum term is produced when one or more boolean variables are logically added. This is also called maxtern. When two or more sum terms are logically multiplied a POS expression is formed.

You may read more on SOP and POS expressions here https://faculty.etsu.edu/tarnoff/ntes2150/Ch6_v02.pdf

Rules and Laws of Boolean Algebra

}  In Boolean algebra a variable can have only either 1 (TRUE) or 0 (FALSE) values. In Boolean algebra 1 is stands to represent the state of TRUE, not integer value 1. Also 0 stands to represent the state of FALSE, not the integer value 0. Therefore addition and multiplication works differently than we normally do in mathematics.

}  In Boolean algebra we do only addition and multiplication.

Basic Rules

Basic Laws


Basic Duality

}  According to basic laws of Boolean algebra there is an important feature called “Basic Duality”. It says that every boolean function has a dual function.

}  The duality principle ensures that "if we exchange every symbol by its dual in a formula, we get the dual result".

}  Everywhere we see 1, change to 0.

}  Everywhere we see 0, change to 1.

}  Similarly, + to ., and . to +.

More examples:

0 . 1 = 0: is a true statement "false and true evaluates to false“ it’s a basic law.

 Now lets replace all values and operations by its opposite value.

1 + 0 = 1: is the dual of (a): it is a true statement that "true or false evaluates true.“ it is also a basic law.

Like this, in every formula, if we replace every value and operation by its opposite, including the result, we get a valid formula.

De-Morgan’s Law

This is a very useful law in boolean algebra. This allows to get the complement of a boolean expression. This represent the basic duality of boolean algebra and mostly used when we design circuits using NAND and NOR gates.

 

(x + y)’ = x’.y’

(x.y)’ = x’ + y’

 

To get the complement of a boolean expression, do the following two steps;

 

•    Replace all values in the expression by its opposite.

•    Replace all “+” with “.” and vise versa.




Thursday, November 1, 2018

Logic Gates




Introduction

  • Computer is a electronic device. It is a digital circuit built using many types of electronic components. The most important component in a computer is the processor. There are more than one processors in a modern computer dedicated for specific tasks.
  • Processors are made of combination of millions of transistors. Transistor is the smallest single electronic component inside a processor. There are single transistors in a digital circuit for other operations, but we are talking about inside a computer processor.
  • Using special combinations of different transistors (and other components such as diodes and resistors), small operational and individual circuit blocks are created. These blocks are called “Logic Gates”.
  • We can say that a Logic Gate is the smallest single circuit unit in a processor.
  • So, a processor is made of millions of logic gates.
  • We now know that a computer is a digital circuit and it uses binary number system for data representation. We know that binary number system uses only 1 and 0. In a digital circuit, we can say that these are two states of current TRUE and FALSE.
  • Logic gates are all about representing these two states of current with different inputs and output.
  • It is important to understand how computer works in circuit level to learn other areas of computers such as programming and networking.


Logic Gates

  • There are seven types of logic gates. Each logic gate represent with a unique symbol.
  • A logic gate has one or more input and one output.
  • Logic gates are the building blocks of a digital circuit (processor).
  • Truth tables are used to show the operation of a gate (or gates). A truth table shows output for all possible combinations of inputs.


NOT gate (inverter)

  • NOT gate has one input and one output
  • NOT gate also called as the inverter gate because it convert the input state opposite.
  • As shown in above truth table (A is input and X is output), NOT gate invert the input state.
  • There are only two possible combination of inputs as shown in the above truth table.



AND gate

AND gate has two inputs and one output. When there are two inputs, there are only 4 possible combinations of outputs as shown in the following truth table. Output x TRUE only if both inputs (A and B) are TRUE.


OR gate

Output x TRUE if both or either one input (A or B, or both A and B) is TRUE. These output of gates are calculated according to BOOLEAN ALGEBRA which we will discuss in the next lesson.


XOR gate

Output x is TRUE if only one input is TRUE.



NAND gate

In NAND gate output x is FALSE only if both inputs (A and B) are TRUE.


NOR gate

In NOR gate output x is TRUE only if both inputs (A and B) are FALSE.


XNOR gate

In XNOR gate output x TRUE only if both inputs (A and B) are TRUE or both inputs are FALSE.


Summary

  • Logic gates are the building blocks of a computer processor.
  • There are seven logic gates.
  • Boolean Algebra is the mathematics use to represent operations of logic gates (logic circuits).



Important Notice!

Dear students and friends. When you commenting please do not mention your email address. Because your email address will be publicly available and visible to all. Soon, it will start sending tons of spams because email crawlers can extract your email from feed text.

To contact me directly regarding any inquiry you may send an email to info@bcslectures.website and I will reply accordingly.