0 ratings0% found this document useful (0 votes) 62 views8 pagesComputer Science FBISE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Exclusive-OR Gate
Exclusive-OR (XOR) gate has a graphic symbol similar to
that of OR gate, except for the additional curved line on the
input side. It produces a1 output only when the two inputs
are at different logic levels. Its output expression is
The truth table for XOR gate for two variables is
shown in Fig.1.9.
1.3.2 Truth Table
Atruth table represents a Boolean function or digital logic circuit in table form, It shows how a
logic circuit's output or Boolean expression responds to all the possible combinations of the inputs
using logic’t'for trueand logic’0'for false.
Ithas the following properties.
© Truth table consists of rows and columns.
© It shows relationship between inputs and output from a Boolean function or digital logic
circuit.
© Itshows output for all the possible combinations of inputs using 0 for LOW and 1 for HIGH
© All the combinations of inputs are
listed in columns on the left,
working in the middle and output | x | y [2] #] | tv) | teva) | + ox.2) + Gy)
isshownintherightmostcolumn. [>]o)o/a}1| © | © | o 5
©The input columns are/ololi|ifo| o | o | o °
constructed in the order of binary 574} lili} 0 |e 1a
counting with a number of bits
; ofaj+fafo| o | o fa 1
equal to the number of inputs,
tjofofo{s| © | o | o °
Example: Truth Table fortheBoolean FF} 5 pf 5
function isshown in Table 1.1:
F=te-y.Z)+bxaMQhG 9) afafofols] 1 | o fo 1
=(x.y-Z)+(x.y-z)4 &.
» 4 % a}a)t}olo o 4 o 1
1,3,3 Boolean Identities
Boolean identities are mathematical expressions or equations that are always true, regardless of
the values of the variables involved. In the context of Boolean algebra, which deals with binary
variables and logic operations (AND, OR, NOT), these identities are fundamental for simplifying
and analyzing logical expressions. These Boolean identities are essential for simplifying Boolean
expressions and analyzing digital circuits. Table 1.2 shows some commonly used Boolean
identities.
1renee a Eeruleonecg
Identity Law (OR) A+0=A
Identity Law (AND) AT =A
Domination Law (OR) A+t=4
Domination Law (AND) A-0=0
Complement Law (OR) A=
Complement Law (AND) A R=0
Double Negation Law R=A
Idernpotent Law (OR) A+A=A
Idempotent Law (AND) A-A=A
Associative Law (OR) (A= B) =C=A+(8+C)
Associative Law (AND) {A-B)-C=A-(B-C)
Distributive Law (AND over OR) As (B+C)=(A: B)= (AC)
Distributive Law (AND over OR) A+ (> C)=(A+B) (A+O)
Absorption Law (OR) Ax (A> B)=A
Absorption Law (AND) A> (A+B)=A
Negation Law (De Morgan's Theorem) RrB=4-B
Negation Law (De Morgan's Theorem) K-B=K+B
1.3.4 Boolean Function and its Conversion to Logic Circuit
A Boolean function is an expression formed with
binary variables, the logical operators (OR, AND and
NOT), parenthesis and equal sign. A binary variable
can take the value of 0 or 1. For a given value of the
variables, the function can be either 0 or 1.
‘As an example, consider the following Boolean
function.
Fexty
The function F is equal to 0, if x=0 and y=0. For all
the other combinations of xand y, the function will be equal to 1.
ABoolean function can be transformed froman algebraic expression into a logic circuit composed
12of AND, OR and NOT gates. Thisis explained by the following four examples.
Example 1;
Conversion of Boolean function Fi=xyz to logic
circuit To convert this function to logic circuit, a
single AND gate is required for the term xyz. ANOT
gate is also required to convert z to, before it i
input to the AND gate as shown in Fig.1.10,
Example 2:
Conversion of Boolean function F2=x+yz
to logic circuit To create the logic circuit
of this function, one AND gates is
required for the termyz, one NOT gateto
convert y to y and an OR gate to perform
OR operation on the terms x and yz. The
logic circuit of this function is shown in
Fig.1.11.
Example 3:
Conversion of Boolean function
F4=xy+xz to logic circuit To create the
logic circuit of this function, two AND
gates are required for the terms xy
and Xz, two NOT gates to convert x to
Xandy toy and anOR gate to perform:
the OR operation on the outputs of
two AND gates as shown in Fig. 1.12.
Example 4:
Conversion of Boolean function
FaKy z+ Ky z+xy to logic
circuit. This function has three
terms. Therefore, three AND
gates are required for these
terms. Two NOT gates are
required to obtain x and y. The
output of AND gates is to be
input into an OR gate to perform
the OR operation between all
the three terms. The logic
circuit of this function is shown
in Fig. 1.13.
13,1.3.5 Simplification of Boolean Function using Karnaugh Map (K-Map)
Karnaugh Map (K- Map)
Karnaugh Map (K-Map) was introduced by Maurice Karnaugh in 1953. It provides a simple method
for simplifying Boolean functions. When a simplified Boolean function is converted into a logic
circuit, itrequires less number of gates and hence costs less.
K-map is a pictorial form of a truth table. It consists of square boxes called cells. All the possible
combinations of variables involved in a Boolean function are written inside the cells in their
respective positions. A two-variable K-map contains 27=4 cells, three-variable 2°=8 cells and so
forth.
Simplification of Two-Variable Boolean Function Using K - Map
Atwo-variable K-map for variables A and B is shown in Fig.1.14. It consists
of four cells having two rows and two columns. Suppose the two variables
are A and B. Each row and column is labelled with a variable and its
complement. Complement of a variable is also called prime, Each cell
contains a product term of variables A and 8 in its respected cell. For
example, the term AB is placed in cell that is in rowAand column B.
Simplification of a two-variable Boolean function will be explained with
the following example.
Example 1:
Simplify the Boolean function F1=AB+AB+ABusing K-map.
© The first step to simplify the Boolean function is to
plot the terms of the function on the Karnaugh
map. This function has three terms, for each term,
a1 will be placed in the corresponding cell. This is
shown in Fig. 1.19.
© The next step is grouping cells for simplification.
Grouping means combining cells in adjacent cells.
The K-map contains pair of 1s that is horizontally
adjacent and another pair of 1s that is vertically adjacent as shown in boxes in Fig. 1.16.
© Combine two terms by eliminating the variable that is in both normal
and complemented form. In the horizontal group, 8 appears in both
normal and complemented form. Therefore, B will be eliminated in
this group and only Ais left. Similarly, in the vertical group, A appears
‘in both normal and complemented form. Therefore, A will be
eliminated in this group and only Bwillis left
© Finally, the result is written as the sum of variables as:
FIZAsB
14The following are the rules for simplifying a two-variable Boolean function.
© Foreach term of the function, place 1 in the corresponding cell in Kanaugh map.
© Make groups of two cells that contain 1. Groups may be horizontal or vertical but not diagonal.
© Groups may overlap.
© Eliminate the variable that is in normal and complemented form in the group.
© Write the simplified function in the form of sum of variables that were not eliminated in
groups.
© If a K-map contains two 1s in diagonal cells then group cannot be formed which means the
function cannot be simplified.
Simplification of Three-Variable Boolean Function using K - Map
Athree-variable K-map for variables A, 8 and Cis shown in
Fig.1.17. It consists of eight cells having two rows and four
columns. Rows are labelled with the complement and
normal form of the variable A. Each column is labelled with
two variables, B and C, in their normal or complemented
form, Each cell contains a product term of variables A, B
and C in its respected cell. For example, the term
EBC is placed in cell thats in row and column BC,
The following are the rules for simplifying a three-variable
K-map.
For each term of the function, place 1 inthe corresponding cell in Karnaugh map.
© Form groups of four if possible otherwise groupsof two.
© Groups can contain only 1s.
© Groups can be horizontal or vertical
© Groups can overlap and wrap around the side of the K-map.
© If possible include each 1 in at least one group.
© Eliminate the variables that are in normal and complemented form in a group and create a
term foreach group.
© Write the simplified function in the form of sum of terms. If a cell containing a 1 cannot be
‘included in any group then write the full term with threevariables.
Example 2: Simplify the Boolean function
FIsKBC+ABC+ABC+ ABC
© The first step to simplify the Boolean function is to plot all the terms of the function on the
three variable Karnaugh map. This function has four terms, foreach term, a1 will be placed in
the corresponding cell. This is shown in Fig. 1.18.
15© Make two horizontal groups of two 1s as shown in Fig.1.19.
© Combine two terms by eliminating the variable that is
in both normal and complemented form in a group. In
the group that is on the top, the variable € appears in
both normal and complemented form. Therefore, C
will be eliminated from this group and the combined
term becomes AB. Similarly, in the bottom group also,
appears in both normal and complemented form.
Therefore, C will be eliminated from this group also
and the combined term becomes AB
© The simplified function can be written as the sum of the resulting terms after eliminating the
variable C from both groupsas given. F2=A&+AB.
Example 3:
Simplify the following Boolean function
F3eABC+ABT+ABC+ABT
‘The map for this function is shown in Fig.1.20. There
are four squares marked with 1s, one for each term of the
function. Two adjacent squares are combined in the third
column to give two variable term BC because Ais dropped.
The remaining two squares with 1s are also adjacent. The
map is considered to wrap around the sides to form
adjacent squares. Therefore, these two squares are
combined to give two variable term AC because here 8 is
dropped. Thus the simplified function becomes:
F3=BC+AT
Example 4:
Simplify the following Boolean function
F4=ABC+AB C+HABC+ABC+ABC
The map to simplify this function is shown in Fig.1.21. The function in this example has five
16terms, as indicated by the five squares marked with 1s. It
is simplified by combining four squares in the center to
give the single term C becauseA and B are eliminated. The
remaining single square marked with a 1 is combined with
an adjacent square that has already been used once. This
is allowed because the combination of the two squares
gives the simplified two variable term AB. The simplified
function is:
F4=C+AB
Example 5:
Simplify the Boolean function
F5eABC+ABC+ABCT+ABC+ABT
‘The K-map of this function is shown in Fig.1-22. It is
simplified by combining four squares in the right and left
columns to give the single variable termT because A and B.
are eliminated. The remaining single square marked with
a 1 is combined with the adjacent square on the left that
has already been used once. The combination of the two
squares gives the term AB. From the map we obtain the
simplified function: F5=C+AB.
1.3.7 Principle of Duality In Boolean Algebra
The Principle of Duality in Boolean algebra
states that for any given Boolean
expression/function, a dual expression can earl
obtained by interchanging the AND (.) and OR o
(+) operators while complementing (negating) 1-0
the variables oso De
Duality in Boolean’ algebra refers to a Last ve
fundamental property where certain aiat Toho
operations and rules can be interchanged
while still preserving the logic and truth of Also AsO=t
expressions. In other words, it highlights the 1.A=0 t+Aqt
symmetry between two pairs of operations: cae hei
AND (conjunction) and OR (disjunction), as
‘well as0 (false) and 4 (true). ABH BA A+ Be Bed
Some examples ta illustrate the Principle of | 2)" KYY | X+ +2)" XV +2
Duality are shown Table 1.3. A(A*B)=A AtAB=A
XY +¥ + ZX¥=0 K+YV)YZ+X+¥=1
171.3.8 Uses of Logic Gates
Logic gates are essential components in digital electronics and computing. They are used in
numerous applications in various fields.
The following are some important usages of logic gates.
‘Memory Circuits: Flip-flops and latches, which are built using logic gates, are used to store binary
data in memory circuits. A flip-flop is a digital circuit that stores binary information and is widely
used in digital electronics for building memory elements and sequential logic circuits. A latch is
another type of digital circuit that stores binary information. Latches are often used in memory
storage elements and data path circuits.
Clock Synchronization: Logic gates help in clock synchronization and signal processing in digital
systems.
Data Encoding and Decoding: Logic gates are used to encode and decode data for transmission
and reception in communication systems.
Multiplication and Division: Complex mathematical operations like multiplication and division
can be performed using a combination of logic gates.
Digital Signal Processing (DSP): Logic gates are used in DSP circuits for filtering, modulation, and
demodulation.
Data Encryption and Decryption: Cryptographic algorithms use logic gates for data encryption
and decryption.
Calculator Circuits: Basiccalculatorsuse logic gates to perform arithmetic calculations.
Traffic Light Control: Logic gates are used in traffic light control systems to manage traffic flow.
Robotics: Logic gates playa crucial role in controlling
the movementand decision-making of robots.
Security Systems: Logic gates are used in security
systems to controlaccess, alarms, and surveillance.
Automotive Electronics: In vehicles, logic gates are
used for engine control, airbag deployment, and
anti-lock brake systems (ABS).
Home Automation: Logic gates are employed in
smart home systems to automate tasks like lighting
and temperature control.
Medical Devices: Medical equipment uses logic gates
for monitoring and controlling various functions.
Aerospace Applications: Logic gates are used in
navigation systems, autopilots, and guidance
systems for aircraft and spacecraft.
18