BOOLEAN ALGEBRA

In mathematics and mathematical logic, Boolean algebra is the branch of algebra in which the values of the variables are the truth values true and false, usually denoted 1 and 0, respectively.

A set of rules or Laws of Boolean Algebra expressions have been invented to help reduce the number of logic gates needed to perform a particular logic operation resulting in a list of functions or theorems known commonly as the Laws of Boolean Algebra. Boolean Algebra is the mathematics we use to analyse digital gates and circuits. We can use these “Laws of Boolean” to both reduce and simplify a complex Boolean expression in an attempt to reduce the number of logic gates required. Boolean Algebra is therefore a system of mathematics based on logic that has its own set of rules or laws which are used to define and reduce Boolean expressions. The variables used in Boolean Algebra only have one of two possible values, a logic “0” and a logic “1” but an expression can have an infinite number of variables all labelled individually to represent inputs to the expression, For example, variables A, B, C etc, giving us a logical expression of A + B = C, but each variable can ONLY be a 0 or a 1.

• P1: X = 0 or X = 1 • P2: 0 . 0 = 0 • P3: 1 + 1 = 1 • P4: 0 + 0 = 0 • P5: 1 . 1 = 1 • P6: 1 . 0 = 0 . 1 = 0 • P7: 1 + 0 = 0 + 1 = 1

Table 1: Boolean Postulates

Laws of Boolean Algebra

Note that every law has two expressions, (a) and (b). This is known as duality. These are obtained by changing every AND(.) to OR(+), every OR(+) to AND(.) and all 1's to 0's and vice-versa. It has become conventional to drop the . (AND symbol) i.e. A.B is written as AB. T1 : Commutative Law (a) A + B = B + A (b) A B = B A T2 : Associate Law (a) (A + B) + C = A + (B + C) (b) (A B) C = A (B C) T3 : Distributive Law (a) A (B + C) = A B + A C (b) A + (B C) = (A + B) (A + C) T4 : Identity Law (a) A + A = A (b) A A = A

T5 : (a) (b) T6 : Redundance Law (a) A + A B = A (b) A (A + B) = A T7 : (a) 0 + A = A (b) 0 A = 0 T8 : (a) 1 + A = 1 (b) 1 A = A T9 : (a) (b) T10 : (a) (b) T11 : De Morgan's Theorem (a) (b) Prove T10 : (a) (1) Algebraically:

(2) Using the truth table:

Logic Gates: (AND, OR, XOR, NOT, NAND, NOR and XNOR)

A logic gate is a building block of a digital circuit. Most logic gates have two inputs and one output and are based on Boolean algebra. At any given moment, every terminal is in one of the two binary conditions false (high) or true (low). False represents 0, and true represents 1. Depending on the type of logic gate being used and the combination of inputs, the binary output will differ. A logic gate can be thought of like a light switch, wherein one position the output is off—0, and in another, it is on—1. Logic gates are commonly used in integrated circuits (IC).

Basic logic gates There are seven basic logic gates: AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates.

AND gate

The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A dot (.) is used to show the AND operation i.e. A.B.

OR gate

The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are high. A plus (+) is used to show the OR operation.

NOT gate

The NOT gate is an electronic circuit that produces an inverted version of the input at its output. It is also known as an inverter. If the input variable is A, the inverted output is known as NOT A. This is also shown as A', or A with a bar over the top, as shown at the outputs.

NAND gate

This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The outputs of all NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small circle on the output. The small circle represents inversion.

NOR gate

This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The outputs of all NOR gates are low if any of the inputs are high.

EXOR gate

The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its two inputs are high. An encircled plus sign ( ) is used to show the EOR operation.

Applications of EXOR gate There are many applications for XOR gate such as: 1. Arithmetic Operations: The XOR gate also called (Medulo Two Adder) , since it is used t give the sum of two binary numbers, it has been used in many arithmetic circuits (it will be explained in latter experiments). 2. Parity Checker: One of the advantages of using digital system, is it's capability of detecting and correction errors. This is used specially when digital information is transmitted or stored. One of the simplest form of error detecting is the parity checker, assume that, we have four bit word, to detect the occurrence of an odd number of errors in this word, a single bit will be added to the word that makes the number of "ones" in the word either even number "Even Parity" or odd number "Odd Parity", so, if an odd number of error occurred in the word then the total number of ones will not remain the same, it will change from odd to even or from even to odd. 3. Controlled Inverter:

If one of the input of XOR gate is used as control signal, say B, it will give it's output either as Y=A or Y=A′ depending on control B. How, let's see.

If B=0, Y=A′B+AB′==A′0+A1=AB=0,Y=A′B+AB′==A′0+A1=A

If B=1,Y=A′B+AB′==A′1+A0=A′B=1,Y=A′B+AB′==A′1+A0=A′

It means if control input B=0 , output Y=A means output just follows input whereas when control input B=1, output Y=A′ means output invert it's input. Hence XOR gate is called as controlled inverter.

4. Binary to Gray / Gray to Binary Conversion: The gray code is widely used in many digital systems, specially in shaft register encoders and analog to digital conversion, but it is difficult to use the gray-code in arithmetic operations, since there are only one bit change between two consecutive gray code number, and it is unweighted code, and the XOR gate is the most suitable gate for this purpose.

5. Combinational Logic Circuit Minimization: Another useful application for XOR gate is, it's use in minimizing combinational circuit which will be dealt with in detail in other experiment. 6. Digital Comparator: Many practical applications require the comparator of two numbers A & B searching for either (a) quality or (b) non quality. EXNOR gate

The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output if either, but not both, of its two inputs are high. The symbol is an EXOR gate with a small circle on the output. The small circle represents inversion.

Figure 1: Logic gate symbols

Table 1: Logic gates representation using the Truth table Using the AND and NOT Set Using just the AND and NOT set of logic gates we can create the following Boolean functions and equivalent gates.

AND/NOT Set Equivalents

Using the OR and NOT Set Using the OR and NOT set of logic gates we can create the following Boolean functions and equivalent gates.

OR/NOT Set Equivalents

Using the Full AND, OR and NOT Set Using the full AND, OR and NOT set of logic gates we can create the Boolean expressions for the Exclusive-OR (Ex-OR) and the NOT Exclusive-OR (Ex-NOR) gates as shown.

Full AND/OR/NOT Set to Implement Ex-OR

Full AND/OR/NOT Set to Implement Ex-NOR

Note that neither the Exclusive-OR gate or the Exclusive-NOR gate can be classed as a universal logic gate as they can not be used on their own or together to produce any other Boolean function. Universal Gates: A universal gate is a gate which can implement any Boolean function without need to use any other gate type. The NAND and NOR gates are universal gates.

Logic Gates using only NAND Gates

Thus ALL other logic gate functions can be created using only NAND gates making it a universal logic gate.

Logic Gates using only NOR Gates

Thus ALL other logic gate functions can be created using only NOR gates making it also a universal logic gate. Note also that the implementation of the Exclusive-OR gate is more efficient using NAND gates compared to using NOR gates, while the implementation of the Exclusive-NOR gate is more efficient with NOR gates compared to using NAND gates as in each case only four individual logic gates are required.

BOOLEAN FUNCTION

A Boolean Function is described by an algebraic expression called Boolean expression which consists of binary variables, the constants 0 and 1, and the logic operation symbols. Consider the following example.

Here the left side of the equatio n represents the output Y. So we can state equation no. 1

A Boolean function is described by an algebraic expression consisting of binary variables, the constants 0 and 1, and the logic operation symbols +,’, .. Truth Table Formation A truth table represents a table having all combinations of inputs and their corresponding result. It is possible to convert the switching equation into a truth table. For example, consider the following switching equation.

The output will be high (1) if A = 1 or BC = 1 or both are 1. The truth table for this equation is shown by Table (a). The number of rows in the truth table is 2n where n is the number of input variables (n=3 for the given equation). Hence there are 23 = 8 possible input combination of inputs.

Canonical Form – In Boolean algebra,Boolean function can be expressed as Canonical Disjunctive Normal Form known as minterm and some are expressed as Canonical Conjunctive Normal Form known as maxterm . In Minterm, we look for the functions where the output results in “1” while in Maxterm we look for function where the output results in “0”. We perform Sum of minterm also known as Sum of products (SOP) . We perform Product of Maxterm also known as Product of sum (POS). Boolean functions expressed as a sum of minterms or product of maxterms are said to be in canonical form. Standard Form – A Boolean variable can be expressed in either true form or complemented form. In standard form Boolean function will contain all the variables in either true form or complemented form while in canonical number of variables depends on the output of SOP or POS. A Boolean function can be expressed algebraically from a given truth table by forming a :

• minterm for each combination of the variables that produces a 1 in the function and then taking the AND of all those terms. • maxterm for each combination of the variables that produces a 0 in the function and then taking the OR of all those terms.

positive and negative logic

There are two types of representations used in digital systems, the positive logic and the negative logic representations.

In positive logic representation Bit 1 represents Logic high and Bit 0 represent a Logic low . High is represented by +5 Volts and low is represented by -5 Volts or 0 Volts.

The gates that we have seen already based on positive logic.The operation of negative logic gates are similar as that of positive logic gates but with different logic gate symbol.

The steps to convert positive logic gate to negative logic gate

1. Inner Shape of a gate a. If the internal symbol was an OR gate, Change it to AND gate. b. If it is an AND gate, Change it to OR gate. c. Leave the NOT shape alone. 2. Outputs of a gate a. If the output is Active-High,Change it to Active-Low. b. If the output is Active-Low,Change it to Active-High. 3. Inputs of a gate c. If the Input is Active-High,Change it to Active-Low. d. If the Input is Active-Low,Change it to Active-High. 4. Add Circles to the Input and Output terminals Whenever there are no circles. 5. Remove Circles to the Input and Output terminals Whenever there are circles.

The characteristic features of logic gates are as follows:

 Fan-out:

The measure of the maximum number of logic gates that can be driven by a single logic gate without affecting the specified operational characteristics of the driving gate is called fan-out. A standard fan-out for TTL is ten (10).  Fan-in:

The measure of the maximum possible number of inputs that can be connected to a logic gate without affecting the specified operational characteristics of the driven logic gate is called fan-in. A standard fan-in for TTL is ten (10).

 Propagation delay:

The time taken by an input signal to pass through a logic gate and emerge from the output is known as propagation delay. A typical delay time for a TTL logic gate is 30 nsec.

 Power dissipation:

The power consumed by a logic gate is known as power dissipation.

 Noise:

The unwanted input signal in a logic gate is known as noise.

 Noise margin:

The maximum level of noise voltage allowed at the input without affecting the output is the noise margin.

INTEGRATED CIRCUIT An integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or a microchip) is a set of electronic circuits on one small plate ("chip") of semiconductor material, normally silicon. This can be made much smaller than a discrete circuit made from independent electronic components. ICs can be made very compact, having up to several billion transistors and other electronic components in an area the size of a human fingernail. LEVEL OF INTEGRATION 1.SSI : Small Scale Integration

It has less than 100 components(about 10gates) 2.MSI: Medium Scale Integration It contains less than 500 components or have more than 10 but less than 100 gates. 3.LSI: Large scale integration Number of components is between 500 and 300000 or have more than 100gates. 4.VLSI:very large scale integration. process of creating an integrated circuit (IC) by combining thousands of transistors into a single chip. DIGITAL LOGIC FAMILIES

TYPES OF The digital integrated circuits are designed using bipolar devices or Metal Oxide Semiconductor (MOS) or a combination of both. There are two kinds of semiconductor devices. The logic family which falls under the first kind Bipolar logic family and the other is Unipolar logic family.

BIPOLAR LOGIC FAMILY There are two kinds of operations in bipolar integrated circuits: Saturated Bipolar Logic family and Non-saturated Bipolar Logic family.

Saturated Bipolar Logic Families are:

1. (DL) 2. Resistor Transistor Logic (RTL) 3. Diode Transistor Logic (DTL) 4. Integrated Injection Logic (IIL or I2L) 5. Transistor Transistor Logic (TTL)

Non-saturated Bipolar Logic Families are:

1. Schottky TTL 2. Emitter Coupled Logic (ECL)

UNIPOLAR LOGIC FAMILY Unipolar logic family consists of Metal Oxide Semiconductor (MOS) logic families. They are:

1. P-type MOS (PMOS) Logic 2. N-type MOS (NMOS) logic 3. Complementary MOS (CMOS) logic 4. Bipolar MOS (BiMOS) logic 5. Bipolar CMOS (BiCMOS) logic

CLASSIFICATION OF LOGIC FAMILY Logic families are mainly classified as Bipolar Logic Families and Unipolar Logic Families.

1. Bipolar Logic Families: It mainly uses bipolar devices like diodes, transistors in addition to passive elements like resistors and capacitors. These are sub classified as saturated bipolar logic family and unsaturated bipolar logic family. 1. Saturated Bipolar Logic Family: In this family the transistors used in ICs are driven into saturation. For example: 1. Transistor-Transistor Logic (TTL) 2. Resistor-Transistor Logic (RTL) 3. Direct Coupled Transistor Logic (DCTL) 4. Diode Transistor Logic (DTL) 5. High Threshold Logic(HTL) 6. Integrated Injection Logic (IIL or I 2 L) 2. Unsaturated bipolar logic family: In this family the transistors used in IC is not driven into saturation. For example: 1. Schottky TTL 2. Emitter Coupled Logic(ECL) 2. Unipolar Logic Families: It mainly uses Unipolar devices like in addition to passive elements like resistors and capacitors. These logic families have the advantages of high speed and lower power consumption than Bipolar families. These are classified as: 1. PMOS or P-Channel MOS Logic Family 2. NMOS or N-Channel MOS Logic Family 3. CMOS Logic Family

FEATURES OF LOGIC FAMILIES

1. TTL - Transistor-Transistor Logic: Standard logic family; used for the longest time. 2. ECL - Emitter Coupled Logic: Suitable for systems requiring high-speed operations. 3. MOS - Metal Oxide Semiconductor Logic: Suitable for systems with high component density. 4. CMOS - Complementary Metal Oxide Semiconductor Logic: Suitable for systems with low power consumption (VLSI circuits). Gradually becomes the dominant logic family.

Some statistical characteristics data of different logic families