Computer Project
Computer Project
George Boole in 1980 invented a different kind of algebra based on binary nature as the logic, this algebra of logic called BOOLEAN ALGEBRA. A logical statement can have only two values, such as HIGH/LOW, ON/OFF, CLOSED/OPEN,
YES/NO,
TRUE/FALSE,
CONDUCTING/NON-
CONDUCTING etc.
statements one denoted by the binary number 1 and 0. The binary number 1 is used to denote the HIGH value and 0 is used to denote LOW value.
1 | Page
LOGIC GATES
A gate is a basic electronic circuit which operates on one or more signals to produce one output. The Logic Gates are building blocks at digital electronics. They are used in digital electronics to change on voltage level (input voltage) into another (output voltage) according to some logical
statement relating them. Logic gates are primarily implemented using diodes or transistors acting as electronic switches. With amplification, logic gates can be cascaded in the same way that Boolean functions can be composed, allowing the construction of a physical model of all of Boolean logic, and therefore, all of the
expressed in the form of a table called truth table or table of combinations. Truth table of a Logic Gates is a table that shows all the input and output possibilities for the logic gate, in other words, it defines the function of a gate by listing all possible input combinations that the gate could encounter, and the corresponding output.
3 | Page
TYPES OF GATES
Lets examine the processing of the following five types of gates- their functions, boolean expressions, symbols, and truth tables NOT GATE AND GATE OR GATE NAND GATE NOR GATE Typically, logic diagrams are black and white, and the gates are distinguished only by their shape.
4 | Page
THE OR GATE
The OR gate is a two inputs and one output logic gate. It combines the input A and B to give output X according to the Boolean expression.
X=A+B
In Boolean algebra, the addition symbol (+) is called OR operator. The various possible combinations of the input and output of the OR gate can be easily understood with the help of the electrical circuits. In this electrical circuit, a parallel combination of two switches A and B is connected to a battery and a bulb L. The following inference can be easily drawn from the working of electrical circuit:
5 | Page
If switch A and B are open, the bulb does not glow. ( A = 0, B = 0) If switch A is open and B closed, the bulb glows. ( A = 0, B = 1) If switch A is closed and B open, the bulb glows. ( A = 1, B = 0) If switch A is closed and B is also closed, the bulb glows. ( A = 1, B = 1) To conclude, if either of the inputs is high( i.e 1) the output is high ( i,e 1) and if none of the inputs is high the output is low. The same can be represented by using a truth table.
The OR gate is also two inputs and one output logic gate. It combines the input A and B to give output
according
to
the
Boolean
expression.
X = A. B
In Boolean algebra, the dot symbol (.) or cross symbol () is called AND operator. The various possible combinations of the input and output of the OR gate can be easily understood with the help of the electrical circuits. In this electrical circuit, a series combination of two switches A and B is connected to a battery and a bulb L.
7 | Page
The following inference can be easily drawn from the working of electrical circuit:
If switch A and B are open, the bulb does not glow. ( A = 0, B = 0) If switch A is open and B closed, the bulb does not glow. ( A = 0, B = 1) If switch A is closed and B open, the bulb does not glow. ( A = 1, B = 0) If switch A is closed and B is also closed, the bulb glows. ( A = 1, B = 1) To conclude, only if both the inputs are high( i.e 1) the output is high ( i,e 1) or else the output is low. The same can be represented by using a truth table.
The OR gate is one input and one output logic gate. It takes the input A to give output X according to the Boolean expression.
X = A
In Boolean algebra, the symbol or ~ symbol is called NOT operator. The possible combinations of the input and output of the NOT gate can be easily understood with the help of the electrical circuits. Here, the switch is connected in parallel to the bulb of the battery. The following conclusion can be easily drawn from the working of the electrical circuit.
9 | Page
glow (i.e. Y=1) If Switch A is closed (i.e. A=1), the lump will not glow (Y=0).
It follows that in the given electrical circuit, the bulb glows (or output is high), when the switch A is open. For this reason, the electrical circuit is called not gate. Since the output state is always opposite of the input state it is also called INVERTER gate. The two possible input-output combinations can be written in the form of the table. It is called truth table of NOT gate. TRUTH TABLE FOR NOT GATE
10 | Page
UNIVERSAL GATES
The NOR gate and NAND gate are more popular as these are less expensive and easier to design. And also other switching functions (AND, OR, NOT ) can be easily implemented using NAND
or NOR gates. Thus NAND and NOR gates are also referred as universal gates.
A NAND gate (sometimes referred to by its extended name, Negated AND gate) is a digital logic gate with two or more inputs and one output with behaviour that is the opposite of an AND gate.
X = (A . B)
The output of a NAND gate is high, when one or more, but not all, of its inputs are low. If all of a NAND gate's inputs are high, then the output of the NAND gate is low. The same can be represented by using a truth table.
12 | Page
X = (A + B)
The output of a NOR gate is low when either one or more, of its inputs are high. If all of a NOR gate's inputs are low, then the output of the NOR gate is high. The truth table for NOR gate is:
13 | Page
19 | Page