Académique Documents
Professionnel Documents
Culture Documents
INSTITUTE OF TECHNOLOGY
Department of Electrical and Computer Engineering
Course name: Digital Logic Design
Course code: ECEg3141
Course instructor: Amare Worku
Contact information:
Email: amareworku2154@gmail.com
Consultation hours:
Monday: from 8:00-11:00
CHAPTER FIVE
5.1 COMBINATIONAL LOGIC
AND-OR logic
Exclusive or logic
Combinational circuits: Logic circuits whose outputs at any time are determined directly and
only from the present input combination .
i.e. they have no memory.
AND-OR Logic
Example: Develop a logic circuit with four input variables that will only produce a 1 output
when exactly three input variables are 1s.
Cont.….
NAND gate
The NAND Gate as a Universal Logic Element:
The NAND gate is a universal gate because it can be used to produce
the NOT, the AND, the OR, and the NOR functions.
Cont.….
THE UNIVERSAL PROPERTY OF NAND AND NOR GATES
NOR gate
The NOR Gate as a Universal Logic Element:
The NOR gate is a universal gate because it can be used to produce
the NOT, the AND, the OR, and the NAND functions.
Cont.…..
Cont.…..
Adders
Subtractor
Comparators
Decoders
Encoders
Multiplexers
Demultiplexers
Adders
Adders are important in
computers
other types of digital systems in which numerical data are processed
There are two type of adder:
half adder and
Full adder
The Half-Adder
• The half-adder accepts two binary digits on its inputs and produces two binary digits on its
outputs, a sum bit and a carry bit.
The Full-Adder
The full-adder
accepts two
input bits and
an input carry
and generates a
sum output and
an output carry.
Cont.…..
Cont.…..
example
Evaluate the sum and carry of the following full adder ckt,
Parallel Binary Adders
Two or more full adders are connected to form parallel binary adders.
To add two binary numbers, a full-adder is required for each bit in the numbers.
So, for 2-bit numbers, two adders are needed.
Cont.….
The carry output of each adder is connected to the carry input of the next higher-order adder.
Four-Bit Parallel Adders
A group of 4 bits is called a nibble. A basic 4-bit parallel adder is implemented with four full-
adder stages as shown.
Cont.……
The half-subtractor is a combinational circuit which is used to perform subtraction of two bits.
It has two inputs, X (minuend) and Y (subtrahend) and two outputs D (difference) and B
(borrow).
The truth table for the half subtractor is given below
Full Subtractor
A full subtractor performs subtraction operation on two bits, a minuend and a subtrahend, and
also takes
into consideration whether a ‘1’ has already been borrowed by the previous adjacent lower
minuend bit or not.
As a result, there are three bits to be handled at the input of a full subtractor, namely the two
bits to be subtracted and a borrow bit designated as Bin.
There are two outputs, namely the DIFFERENCE output D and the BORROW output Bo.
The BORROW output bit tells whether the minuend bit needs to borrow a ‘1’ from the next
possible higher minuend bit.
Cont.……
The Boolean expressions for the two output variables are given by the equations
cont.……
Comparators
To compare the magnitude of two binary quantities to determine the relationship of those
quantities.
The simplest form a comparator ckt determines whether two numbers are equal.
Equality
XOR gate can be used as a 2-bit comparator.
Inequality
X=1, implies ,A =B
Y =1,implies ,A> B
Z =1,Implies ,A<B
then the logic ckt becomes
Cont.……
To determine an inequality of binary numbers A and B, you first examine the highest-order bit
in each number:
If A3=1 and B3=0 number A is greater than number B
If A3=0 and B3=1 number A is less than number B
If A3=B3 you must examine the next lower bit position
for an equality.
Decoders
A decoder detects the presence of a specified combination of bits (code) on its inputs and
indicates the presence of that code by a specified output level.
In its general form, a decoder has n input lines to handle n bits and forms one to 2n output
lines to indicate the presence of one or more n-bit combinations.
The Basic Binary Decoder
Suppose we need to determine when a binary 1001 occurs on the inputs of a digital ckt.
The 4-Bit Decoder
In order to decode all possible combinations of four bits, 16 decoding gates are required
(24=16).
This type of decoder is commonly called either:
A 4-line-to-16-line decoder, or
A 1-of-16 decoder
Decoding functions and truth table for a 4-line-to-16-line decoder with active-LOW outputs
see the next slide.
Cont.……..
Cont.……
The BCD-to-Decimal Decoder