Binary logic • Binary logic deals with variables like (a, b, c , …, x, y) that take on two discrete values (0 , 1) and with operations that assume logic meaning ( AND, OR, NOT) • Truth table is a table of all possible combinations of the variables showing the relation between the values that the variables may take and the result of operation. •Ex. AND ( . ) z= x . y z= x and y z=xy z=x and y Dr.Abu-Arqoub 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Binary logic
• Binary logic deals with variables like (a, b, c , …, x, y) that take on two discrete values (0 , 1) and with operations that assume logic meaning ( AND, OR, NOT)
• Truth table is a table of all possible combinations of the variables showing the relation between the values that the variables may take and the result of operation.
•Ex.
AND ( . )
z= x . y z= x and y
z=xy z=x and y
Dr.Abu-Arqoub1
AND GATE
Z=x.yyx
000
010
001
111
• 0 off
• 1 on
~`
X Y
Dr.Abu-Arqoub2
OR GATE
• OR (+)
Z=X+Y Z= x or y
Z=X+YYX
000
110
101
111
Dr.Abu-Arqoub3
OR GATE
~`
X
Y
Dr.Abu-Arqoub4
NOT GATE
• NOT (Bar), (Prime)
• Z = X‘ , Z = X NOT
X, X Bar, X Prime
Z=X’X
10
01
Dr.Abu-Arqoub5
NOT GATE
`X~
Dr.Abu-Arqoub6
Boolean algebra and logic gates
• Boolean algebra is an algebraic structure defined on a set of elements B together with two binary operators +(OR) and .(AND) providing the following postulates:
1. cloused with respect to operator +(OR)(مغلقة)
a + b=c a, b, c Є B
and closer with respect to operator .(AND)
a . b=c a, b, c Є B
2. An identity (محايد) element with respect to +(OR) by 0 and an identity element with respect to .(AND) by 1
x+0=0+x=x
x. 1=1. x=x
3. Commutative(تبديلي) with respect to +: x +y=y + x
Commutative with respect to . : x. y=y. x
4. Distributive (توزيعي)
. (AND) is distributive over +(OR): x (y + z)=x . y + x . z
+(OR) is distributive over .(AND): x +(y . z)=(x + y) . (x + z)
Dr.Abu-Arqoub7
Boolean algebra and logic gates
5. For every element x Є B, there exist an
element x’ Є B called the complement of x
such that : x+x’=1 and x.x’=0
6. There exist at least two elements x, y Є B
such that x ≠ y
Dr.Abu-Arqoub8
Boolean algebra and logic gates
• Example :
• a two – valued Boolean algebra is defined on a set of two elements B={ 0,1}, with rules for the two binary operators (+) & (.) such
1. Closed results 0 or 1
and (0,1) Є B
2. It has the two identity elements 0 for (+) and 1 for (.)
3 commutative since x+y=y+x & x.y=y.x
4.------ next slide
5. For each x there is x’ : x+x’=1
• 0+1=1
• 1+0=1
6. Two elements (0,1) with 0≠ 1
x.x’x+x’x’x+yx.yyx
0110000
0111010
0101001
0101111
Dr.Abu-Arqoub9
Boolean algebra and logic gates
4. Distributive since
x.(y+z)=x.y+x.z
xy+xzx.(y+z)Y+zx.zx.yzyx
00000000
00100100
00100010
00100110
00000001
11110101
11101011
11111111Dr.Abu-Arqoub10
Basic theorems and properties of Boolean algebra
• Duality (ازدواجية): in duality leave the
element (variables) of the set of B the
same, then change the (+) by (.)
operators, the (.) by (+) & replace the 1’s
by zeros, and zeros by ones.
• Ex
x+0=x by duality x.1=x
Dr.Abu-Arqoub11
Postulates & Theorems of Boolean Algebra
1. X + 0 = X X . 1 = X
2. X + X’ = 1 X . X’ = 0
3. X + X = X X . X = X
4. X + 1 = 1 X . 0 = 0
5. (X’)’ = X
6. X + Y = Y + X X . Y = Y . X
7. X + ( Y + Z ) = ( X + Y ) + Z
X . ( Y . Z ) = ( X . Y ) . Z
Dual
Dr.Abu-Arqoub12
Postulates & Theorems of Boolean
Algebra
8. X . ( Y + Z ) = X . Y + X . Z
X + ( Y . Z ) = X + Y . X + Z
9. ( X + Y )’ = X’ . Y’ (De Morgan Theorem)
( X . Y )’ = X’ + Y’
10. X + XY = X X . ( X + Y ) = X
X . ( X + Y ) = X . X + X . Y
= X + XY
= X ( 1 + Y )
= X . 1
= X
Dr.Abu-Arqoub13
Postulates & Theorems of Boolean
Algebra
Dr.Abu-Arqoub14
Boolean Functions
• A Boolean function is an expression
formed with binary variables, the two
binary operators OR & AND, the unary
operator NOT, parentheses, and
equal sign.
• A Boolean function may be represented in
a truth table.
Dr.Abu-Arqoub15
Boolean Functions
• Ex: Suppose we have three Boolean
functions: F1, F2, and F3.
F1 = F2 & F1 ≠ F3
F3 (X, Y)F2 (X, Y)F1 (X, Y)YX
10000
11110
11101
11111
Dr.Abu-Arqoub16
Boolean Functions
• Two functions of n variables are said to be
equal if they have the same value for all
possible 2n combinations of n variables.
• The complement of a function F is F’ and
it’s obtained from an interchange of 0’s for
1’s and 1’s for 0’s in the value of F.
Dr.Abu-Arqoub17
Boolean Functions
• Ex:
Note: (F1)’≠ (F2) ,(F1 dual F2) but (F1)’=(F3)
F3 (X, Y, Z) =
X’ + Y’ + Z’
F2 (X, Y, Z) =
X + Y + Z
F1 (X, Y, Z) =
X . Y . Z
ZYX
100000
110100
110010
110110
110001
110101
110011
011111
Dr.Abu-Arqoub18
Examples on functions
• Draw a logic circuit that represents the
following function:
F=x+y’z
Dr.Abu-Arqoub19
Examples on functions
• Draw a logic circuit that represents the
following function:
F=xy’+x’z
Dr.Abu-Arqoub20
Examples on functions
• Draw a logic circuit that represents the following
functions:
Dr.Abu-Arqoub21
Simplification of Boolean Functions
• Simplify the following Boolean functions:• 1. x(x’+y)
• 2. x+x’y
• 3. (x+y).(x+y’)
• 4. xy+x’z+yz
Dr.Abu-Arqoub
22
Simplification of Boolean Functions
• Simplify the following Boolean functions:
F=x’y’z+x’yz+xy’
=x’z(y’+y)+xy’
=x’z.1+xy’
= x’z+xy’
Dr.Abu-Arqoub23
Complement of a Boolean function
• To find the complement of any Boolean
function we can use:
• 1. Direct method (using Demorgan law)
• 2. Dual of the function and complement of
each literal.
• 3. min-max terms
Dr.Abu-Arqoub24
Complement a function using Demorgan law
• In this method• 1. the relation between elements changed from AND to OR
and vice versa
• 2. each element individually inversed
• Examples:
– find the complement of the following functions:
• 1. F=x’yz’+x’y’z
F’
Dr.Abu-Arqoub25
Examples
• 2.
F1’
• 3. F2=x.(y’z+yz’)
F2’=x’+(y’z+yz’)’
=x’+(y’z)’.(yz’)’
=x’+(y+z’).(y’+z)
Dr.Abu-Arqoub26
Complement a function using Duality
• In this method :• 1. take the dual of the function
• 2. take the complement of each literal
• Example:
F=x.(y’z+yz’) find F’
1. dual x+(y’+z).(y+z’)
2. complement of each litiral
x’+(y+z’).(y’+z)
Dr.Abu-Arqoub27
Example
Given F (X, Y, Z) = XY’Z + XYZ’, Find F’
using:
1.De Morgan’s theorem
2.Dual & then complement the variables.
Continue Dr.Abu-Arqoub28
Example
1. Using De Morgan’s theorem
F’(X, Y, Z) = (XY’Z + XYZ’ )’
= (X’ + Y + Z’) . (X’ + Y’ + Z)
2. Using dual & then complement the
variables
Duality of F (X + Y’ + Z) . (X + Y + Z’)
Then complement the variables
F’(X, Y, Z) = (X’ + Y + Z’) . (X’ + Y’ + Z)Dr.Abu-Arqoub29
Digital logic gates
Dr.Abu-Arqoub30
Digital logic gates
Dr.Abu-Arqoub31
NAND (NOT AND) Gate
• F1(X, Y, Z)
• F1‘ (X, Y, Z)
• We can describe it using the NAND gate as
follows: Continue
Dr.Abu-Arqoub32
NAND Gate
Continue Dr.Abu-Arqoub33
NOR (NOT OR) Gate
• F2(X, Y, Z)
• F2‘ (X, Y, Z)
• We can describe it using the NOR gate as
follows: Continue
Dr.Abu-Arqoub34
NOR Gate
• Note: A simple way for deriving the complement
of a function is to take the dual & complement
each literal.
Dr.Abu-Arqoub35
Boolean Functions (Min-terms)
• Any Boolean function can be expressed as a sum of
min-terms (“sum” : ORing of terms) and the function will
be in sum of Product (SOP).
• n variables forming an AND term with each variable
being primed (if equal to 0) or unprimed (if equal to 1)
providing 2n possible combinations called min-term (mj)