Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Booleanlogic (Newsyllabus)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Computer Science

Teacher: Maruf Ahmed


Boolean logic (Chapter 10)
Every digital product, like computers, mobile, calculators even digital watches etc. contain logic gates.
Logic gates are the basic building blocks of any digital system. Some examples of devices where logic
gates are used in computers are register, solid state drive, arithmetic logic unit, memory, microprocessor
etc.
Each logic gate is having one or more than one input and only one output. The relationship between the
input and the output is based on certain logic. Based on this, logic gates are named as AND gate, OR gate,
NOT gate etc.
Logic gates representations using the symbols, and the truth tables for each gate

Input Output
A X
0 1
1 0

Input Output
A B X
0 0 0
0 1 0
1 0 0
1 1 1

Input Output
A B X
0 0 0
0 1 1
1 0 1
1 1 1

Input Output
A B X
0 0 1
0 1 1
1 0 1
1 1 0

Input Output
A B X
0 0 1
0 1 0
1 0 0
1 1 0
Page 1 of 4
Input Output
A B X
0 0 0
0 1 1
1 0 1
1 1 0

Input Output
A B X
0 0 1
0 1 0
1 0 0
1 1 1

Basic logic gates: NOT gate, AND gate and OR gates are known as basic logic gates. All the other gates
have been derived from the basic three gates.
Derived logic gates: NAND, NOR, XOR, XNOR gates are known as derived logic gates as each of these
gates are derived from combining one or more basic gates.
Universal gates: NAND and NOR gates are known as universal gates as just by using each of these gates
any other gates can be made.
Order of operation for the 3 basic gates: Logic gates follow the precedence (order of operations) as
given below for the basic gates:
1. NOT gate
2. AND gate
3. OR gate
However, if parentheses (brackets) are given then the parentheses part will be performed first.
Binary 1 (one) can also be mentioned/represented/denoted by TRUE, ON or HIGH and binary 0 (zero) as
FALSE, OFF or LOW. They all mean same.

Page 2 of 4
Functions of the logic gates:

Name of the gates Description writing in logic writing in Boolean Algebra


notation

NOT Output X is 1 if input A is 0 X = NOT A X= A

AND Output X is 1 if both inputs, X = A AND B X = A.B


A and B are 1

OR Output X is 1 if either input A X = A OR B X=A+B


or B is 1

NAND Output X is 1 if input A and X = A NAND B X = A.B


B are not both 1

NOR Output X is 1 if neither input X = A NOR B X=A+B


A nor input B is 1

XOR Output X is 1 if (input A is 1 X = A XOR B X=AB


and input B is 0) or (input A
The breakdown of the above
is 0 and input B is 1)
representation is as follows:
F = (A.B) + (A.B)

XNOR Output X is 1 if (input A is 1 X = A XNOR B X=A  B


and input B is 1) or (input A
The breakdown of the above
is 0 and input B is 0)
representation is as follows:
X = (A.B) + (A.B)

The following topics must be covered for logic gates:


(a) Use logic gates to create given logic circuits from a
(i) problem statement (scenario based)
(ii) logic expression
(iii) truth table
(b) Complete a truth table from a
(i) problem statement (scenario based)
(ii) logic expression
(iii) logic circuit
(c) Write a logic expression from a
(i) problem statement (scenario based)
(ii) logic circuit
(iii) truth table
Page 3 of 4
You also need to know the use of universal gates (NAND and NOR) to build NOT, AND, and OR gates
NOT gate using NAND gate: We can create a NOT gate from a NAND gate simply by tying the two
inputs of the NAND gate together. Because the two inputs of the NAND gate are tied together, only two
input combinations are possible: both HIGH or both LOW. If both inputs are HIGH, the NAND gate will
output a LOW. If both inputs are LOW, the NAND gate will output HIGH. Thus, the circuit behaves
exactly as a NOT gate would.

AND gate using NAND gate: You can create an AND gate by using two NAND gates. The first NAND
gate does what NAND gates do: returns LOW if both inputs are HIGH and returns HIGH if both inputs
are anything else. Then the second NAND gate is configured as a NOT gate to invert the output from the
first NAND gate.
One of the basic rules of NOT gates is that if you invert a signal twice, you end up with the same signal. If
the original input is HIGH, and you invert it, the signal becomes LOW. Invert the input again, and it
returns to HIGH. With this rule in mind, you should be able to see how the two NAND gates work
together to create an AND gate.
OR gate using NAND gate: You need three NAND gates to create an OR gate. First, you use a pair of
NAND gates configured as NOT gates to invert the two inputs. Then the third NAND gate produces a
LOW output if both of the original inputs are LOW. If one of the original inputs is HIGH, or if both of the
original inputs are HIGH, the output of the third gate is HIGH.

Similarly you can create NOT, OR and AND gates using NOR gates only. Remember for building OR
gate using NOR gate you will need two NOR gates only and for building AND gate using NOR gate you
will need three NOR gates.

Page 4 of 4

You might also like