You are on page 1of 9

UNIT –II

2. Logic Circuits:
2.1 Boolean algebra
 In 1854 George Boole developed an algebraic system known
as Boolean algebra.
 Boolean algebra is a branch of mathematics and it can be
used to describe the processing of binary information (0 and
1).
 Boolean algebra deals with the manipulation of objects that
can take only two logical values viz. TRUE and FALSE.
 The two-valued Boolean algebra has important application in
the design of modern computing systems.
2.1.1 Boolean Expression
 It is the combination of the variables and Boolean
operations.
 Basic Boolean operators: AND (*), OR (+), NOT (~)
 The AND operator is also known as a Boolean product. The
Boolean expression xy is equivalent to the expression x * y
and is read as “x and y.”
 The OR operator is often referred to as a Boolean sum. The
expression x+y is read as “x or y”.
 Complementary value of x is denoted as
𝑥 (or x’) and read as “NOT(x)”.
Truth Table:
 A truth table shows the relationship, in tabular form, between
the input and output values for the particular Boolean
operation.
 The truth tables of AND, OR and NOT operations are as
shown in table 1.

Table 1: Truth Table of AND, OR, NOT


AND OR NOT
Input Output Input Output Input Output
x y xy x y x+y x x’
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
 As per precedence rule for Boolean operators, NOT is given a
top priority, followed by AND, and then OR as shown in table
2.

Table 2: The Truth Table for F(x, y, z) = x + y’z


Inputs Outputs
x y z 𝐲 𝐲𝐳 F= x+𝒚𝒛
0 0 0 1 0 0
0 0 1 1 1 1
0 1 0 0 0 0
0 1 1 0 0 0
1 0 0 1 0 1
1 0 1 1 1 1
1 1 0 0 0 1
1 1 1 0 0 1

2.1.2 Boolean Laws


 Boolean Laws are listed in table 3.

Table 3: Boolean Laws

 DeMorgan’s law provides an easy way of finding the


complement of a Boolean function.

𝐱𝐲 = 𝐱 + 𝐲 and 𝐱 + 𝐲 = 𝐱 𝐲
2.1.3 Representing Boolean Functions
 Two expressions that can be represented by the same truth table
are considered logically equivalent.
 The two most common standardized forms are the sum-of-
products form and the product-of-sums form.
 In the sum-of-products form, ANDed variables are ORed together.
For example,
F(x,y,z) = xy + xz + yz
 In the product-of-sums form, ORed variables are ANDed together.
For example,
F(x,y,z) = (x+y) (x+z) (y+z)
Realization of Boolean Expressions using basic gates and their truth table

2.2 Logic gates


 Logic gates are circuits designed to produce the basic logic
functions, AND, OR, etc.
 These circuits are designed to be interconnected into larger,
more complex, logic circuit arrangements.
 Each gate has its British Standard (BS) symbol together with its
American Standard (MIL/ANSI) symbol.
 Note: ‘+’ to denote OR, ‘.’ to denote AND, and ‘-’ to denote NOT.

a) Buffers
 Buffers do not affect the logical state of a digital signal (i.e. a
logic 1 input results in a logic 1 output whereas a logic 0
input results in a logic 0 output).
 Buffers are normally used to provide extra current drive at
the output but can also be used to regularize the logic levels
present at an interface.
 The Boolean expression for the output, Y, of a buffer with an
input, X, is:
Y=X

Figure 2.1 Symbols and truth table for a buffer


b) Inverters
 Inverters are used to complement the logical state (i.e. a logic
1 input results in a logic 0 output and vice versa).
 Inverters also provide extra current drive and, like buffers,
are used in interfacing applications where they provide a
means of regularizing logic levels present at the input or
output of a digital system.
 The Boolean expression for the output, Y, of a buffer with an
input, X, is:
Y=X

Figure 2.2 Symbols and truth table for an inverter

c) AND gates
 AND gates will only produce a logic 1 output when all inputs
are simultaneously at logic 1.
 Any other input combination results in a logic 0 output. The
Boolean expression for the output, Y, of an AND gate with
inputs, A and B, is:
Y = A.B

Figure 2.3 Symbols and truth table for an AND gate

d) OR gates
 OR gates will produce a logic 1 output whenever anyone, or
more, inputs are at logic 1.
 An OR gate will only produce a logic 0 output whenever all of
its inputs are simultaneously at logic 0.
 The Boolean expression for the output, Y, of an OR gate with
inputs A and B is:
Y=A+B

Figure 2.4 Symbols and truth table for an OR gate

e) NAND gates
 NAND (i.e. NOT-AND) gates will only produce a logic 0 output
when all inputs are simultaneously at logic 1.
 Any other input combination will produce a logic 1 output.
 The circle shown at the output denotes this inversion.
 The Boolean expression for the output, Y, of a NAND gate with
inputs A and B is:
Y = A .B

Figure 2.5 Symbols and truth table for a NAND gate

f) NOR gates
 NOR (i.e. NOT-OR) gates will only produce a logic 1 output
when all inputs are simultaneously at logic 0.
 Any other input combination will produce a logic 0 output. A
NOR gate, therefore, is simply an OR gate with its output
inverted.
 The Boolean expression for the output, Y, of a NOR gate with
inputs, A and B, is:
Y = A+B

Figure 2.6 Symbols and truth table for a NOR gate

g) Exclusive-OR gates
 Exclusive-OR gates will produce a logic 1 output whenever
either one of the inputs is at logic 1 or the other is at logic 0.
 Exclusive-OR gates produce a logic 0 output whenever both
inputs have the same logical state (i.e. when both are at logic
0 and both are at logic 1).
 The Boolean expression for the output, Y, of an exclusive-OR
gate with inputs A and B is:

Y = A. B + A.B

Figure 2.7 Symbols and truth table for an exclusive-OR gate

Combinational logic
 By using a standard range of logic levels (i.e. voltage levels
used to represent the logic 1 and logic 0 states) logic circuits
can be combined in order to solve complex logic functions.

Example 2.1
A logic circuit is to be constructed that will produce a logic 1 output
whenever two or more of its three inputs are at logic 1.

Solution
This circuit could be more aptly referred to as a majority vote
circuit. Its truth table is shown in Fig. 2.8. Fig. 2.9 shows the logic
circuitry required.

Figure 2.8 See Example 2.1

Figure 2.9 See Example 2.1

Example 2.2
Show how an arrangement of basic logic gates (AND, OR and NOT)
can be used to produce the exclusive-OR function.

Solution
In order to solve this problem, consider the Boolean expression for
the exclusive-OR function:
Y = A. B + A.B
This expression takes the form:
Y = P + Q where P = A. B and Q = A.B
A. B and A.B can be obtained using two two-input AND gates and
the result (i.e. P and Q) can then be applied to an OR gate with two
inputs. A and B can be produced using inverters. The complete
solution is shown in Fig. 2.10.

Figure 2.10 See Example 2.2


Half Adder
 This circuit adds two binary variables, yields a carry but
does not accept carry from another circuit.
 The truth table of a half adder is given in Fig. 2.11(a) from
which an expression can be written as, S = AB + AB = A ⊕ B
and C = AB.
 The half-adder logic circuit is drawn in Fig. 2.11(b).

A B S C
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
(a) Truth Table
Figure 2.11 Half-adder logic circuit
Full Adder
 This circuit is used to add two binary numbers, accept a carry
and yield a carry.
 The circuit can be visualized by means of two half adders (HA)
and an OR as shown in Fig. 2.12.

Figure 2.12 Full-adder using two half-adder


 Full adder Truth Table

S= Sum; Ci = carry in; Co = carry out;


A, B, Ci = inputs; S, Co = outputs.
Full adder Truth Table
A B Ci S Co
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

 It is observed from the truth table that Co = 1 for rows which


have two 1’s otherwise it is 0.
 Its Boolean equation is, Co = AB + BCi + CiA

Figure 2.13 Full-adder

Multiplexer
 The objective of a multiplexer is to select one signal from a
group of 2n inputs, to be an output on a single output line.
 An 8-to-1 multiplexer (MUX) is as shown in Figure 2.14.

You might also like