Module 3 - LSD
Module 3 - LSD
○ When logic gates are connected together to produce a specified output for certain specified
combination of input variables , with no storage involved, the resulting circuit is in the category of
combinational logic circuits .
B = x’y’z+x’yz’+x’yz+xyz
= z(xy+x’y’) +x’y(z+z’)
= z ( x xnor y) +x’y
Code Conversion
● To convert a binary code A to a binary code B, the input lines must supply the
bit combination of elements as specified by code A and the output lines must
generate the corresponding bit combination of code B.
● A combinational circuit performs this transformation by means of logic gates.
● Eg. of code converter BCD to excess 3.
Binary Parallel Adder
● A full adder can be used to add 3 bits.(2 bits and a previous carry).
● Consider the addition of two 4 bit numbers.
● When a pair of bits are added through a full adder, the circuit produces a carry to be
used with the pair of bits one significant position higher.
● The bits are added with full adders, starting from the least significant position to form
the sum bit and carry bit.
● The input carry Ci in the least significant position must be zero.
● The value of Ci+1 in a given significant position is the output carry of a full adder. This
value is transferred into the input carry of the full-adder that adds the bits one higher
significant position to the left.
● A binary parallel adder is a digital function that produces the arithmetic sum of two
binary numbers in parallel. It consists of full-adders connected in cascade, with the
output carry from one full adder connected to the input carry of the next full-adder.
● An n-bit parallel adder requires n full adders.
N-Bit Parallel Adder
● The full adder is capable of adding two single digit binary numbers along with
a carry input.
● But in practice we need to add binary numbers which are much longer than
one bit.
● To add two n-bit binary numbers we need to use the n-bit parallel adder.
● It uses a number of full adders in cascade.
● The carry output of the previous full adder is connected to the carry input of
the next full adder..
IC 7483 4 – Bit Binary Parallel Adder
A3 B 3 A2 B 2 A1 B 1 A0 B0
C0 C in
S 3 S 2 S1 S 0
B 3 B 2 B1 B 0
A 3 A 2A1 A 0
IC 7483
Cin
C0
Carry
Carry Input
Output
S 3 S 2 S1 S 0
Sum
Output
Design of BCD Adder
Diagram:
C0 IC
7483-I S 3 S 2 S1 S 0
Ci
n
Logic
Circuit
Add 0110
Command
IC 7483-II
C0 Ci
n
S 3 S 2 S1 S 0
Design of BCD Adder
C=K+Z8Z4+Z8Z2
When C=1, add 0110 to the sum generated
Design of BCD Adder
LOOK AHEAD CARRY ADDER/
CARRY LOOK AHEAD ADDER
Limitation of ripple carry adder
● Each adder block waits for the carry to arrive from its
previous block. So, it is not possible to generate the
sum and carry of any block until the input carry is
known. The ith block waits for the (i-1)th block to produce
its carry.
● There will be a considerable time delay which is carry
propagation delay.
● The propagation time is equal to the propagation delay
of each adder block, multiplied by the number of adder
blocks in the circuit.
59
Full adder Unit
Look ahead carry adder
● Increase the speed of processing by predicting the
carry.
(AB).C-IN
A.B
C-Out = A.B+(AB).C-IN
C-Out=G+P.C-IN
Code converter –Binary to gray code
g0 g1
g2 g3
b0
b1
b2
b3
Magnitude comparator
● It is a combinational circuit that compares two digital or binary numbers in order to
find out whether one binary number is equal, less than or greater than the other
binary number.
● Two inputs one for A and other for B and have three output terminals, one for A > B
condition, one for A = B condition and one for A < B condition.
1-Bit Magnitude Comparator
● A comparator used to compare two bits is called a single bit comparator. It
consists of two inputs each for two single bit numbers and three outputs to
generate less than, equal to and greater than between two binary numbers.
● In a 4-bit comparator the condition of A>B can be possible in the following four
cases:
If A3 = 1 and B3 = 0
If A3 = B3 and A2 = 1 and B2 = 0
If A3 = B3, A2 = B2 and A1 = 1 and B1 = 0
If A3 = B3, A2 = B2, A1 = B1 and A0 = 1 and B0 = 0
● Similarly the condition for A<B can be possible in the following four cases:
If A3 = 0 and B3 = 1
If A3 = B3 and A2 = 0 and B2 = 1
If A3 = B3, A2 = B2 and A1 = 0 and B1 = 1
If A3 = B3, A2 = B2, A1 = B1 and A0 = 0 and B0 = 1
The condition of A=B is possible only when all the individual bits of one number
exactly coincide with corresponding bits of another number.
4 bit magnitude comparator Ref:
● We considered one more output, V in order to know, whether the code available
at outputs is valid or not.
○ If at least one input of the encoder is ‘1’, then the code available at outputs is a valid one. In this
case, the output, V will be equal to 1.
○ If all the inputs of encoder are ‘0’, then the code available at outputs is not a valid one. In this
case, the output, V will be equal to 0.
PRIORITY ENCODER
In D to A converters.
2:1 Multiplexer
4:1 Multiplexer
8:1 Multiplexer
16:1 Multiplexer
32:1 Multiplexer
64:1 Multiplexer
and so
on…………
2:1 Multiplexer
Block
Diagram
Truth Table
Realization of 2:1 Mux using gates
4:1 Multiplexer
Realization of 4:1 Mux using gates
8:1 Multiplexer
16:1 MULTIPLEXER
Example 1:
f ( A, B, C ) = m(0, 3, 5, 6)
Example 2
Combinational ckt Using MUX
Implement any Boolean function of ‘n’ variables with
a 2n-1 :1 MUX
● Express the function in sum of minterms.
● Let the ordered sequence of variables chosen for the minterm is ABCD..,where
A is the leftmost variable and BCD…, are the remaining n-1 variables.
● Connect the n-1 variables to the selection lines of the MUX with B connected to
the high-order selection line,C to the next high –order and so on down to the
last variable, which is connected to the s0.
● Since A is in the highest-order position in the sequence of variables, it will be
complemented in first half in the list of minterms, and uncomplemented in the
second half.
● List the inputs of the MUX and under them list all the minterms in two rows.
○ The first row list all those minterms where A is complemented, and the second row all the minterms with A
uncomplemented.
● Circle all the minterms of the function and inspect each column separately.
○ If the two minterms in a column are not circled, apply 0 to the corresponding multiplexer input.
○ If the two minterms are circled aply 1 to the corresponding multiplexer input.
○ If the bottom minterm is circled ant the top is not circled , apply A to the corresponding multiplexer input.
○ If the top minterm is circled ant the bottom is not circled , apply A’ to the corresponding multiplexer input.
● NB:It is not necessary to choose the leftmost variable in the ordered sequence of
variable list for the inputs to the multiplexer, we can choose any one of the variable as
input to the multiplexer.
● Eg:F(A,B,C) =∑(1,3,5,6)
De-multiplexer
Block Diagram of De-multiplexer
Types of De-multiplexers
1: 2 De-multiplexer
1:2 De-mux using basic gates
1: 4 De-multiplexer
1:4 De-mux using basic gates
1: 8 De-multiplexer
1: 8 De-multiplexer
1: 16 De-multiplexer
2:4 Decoder
2X4 DECODER WITH ENABLE ACTIVE LOW
4x16 decoder using 3x8 decoders
Parity Generator/Checker
● Even Parity Generator
● Circuit diagram of odd parity generator
● Even Parity Checker
● Odd Parity Checker