Digital Logic Unit 67 and 8. Full Note
Digital Logic Unit 67 and 8. Full Note
Ans→ Combinational logic circuits are fundamental building blocks in digital electronics that
produce an output based on the current input values, without considering any past
inputs.
In other words, the output of a combinational logic circuit depends only on the present
input conditions, with no memory elements involved.
Examples of combinational logic circuits include:
1)Adder 2) Subtractor 3) Encoder 4) Decoder 5) Multiplexer (MUX) 6) Demultiplexer (DE-MUX) etc..
Sum (S)
A B (A+B) Carry (C)
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Here's the logic circuit for a half adder: Expression of sum(s)and carry(c):
Sum (S) = A XOR B
Sum (S)
A B C(in) (A+B+C) Carry-out C(out)
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
Truth Table:
Circuit Diagram:
6.3. Decimal to Binary Encoder and Decimal to BCD Encoder
Q. What is encoder?Write its example and draw the block diagram of encoder.
Ans→ An encoder is a digital circuit that converts input signals into a coded output,
usually in binary or Gray code format. It's used to represent a large number of
inputs with fewer output bits, saving space and improving efficiency in data
transmission and processing.
Examples of encoder are: priority encoders, decimal to BCD encoders, and binary to Gray
code encoders.
Encoders are used as code converters in computer systems. These are available as IC’s in the market.
To convert a decimal number into binary or Decimal to BCD Encoder is used. In the BCD system,
the decimal number is represented as the four-digit binary. It can convert the decimal numbers from
0 to 9 into the binary stream.
The encoder is a combinational logic circuit. The reverse of the encoder is a decoder that performs
the reverse action.
The truth table of Decimal to BCD encoder is given below.
Note: only see the 1 in A0, A1,A2,A3 vertically and add ----to get expression
From the truth table above form the equations for the words A3, A2, A1, A0.
Y9 Y8 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 A3 A2 A1 A0
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 1
0 0 0 0 0 0 0 1 0 0 0 0 1 0
0 0 0 0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 0 1 0 0 0 0 0 1 0 0
0 0 0 0 1 0 0 0 0 0 0 1 0 1
0 0 0 1 0 0 0 0 0 0 0 1 1 0
0 0 1 0 0 0 0 0 0 0 0 1 1 1
0 1 0 0 0 0 0 0 0 0 1 0 0 0
1 0 0 0 0 0 0 0 0 0 1 0 0 1
Note: only see the 1 in A0, A1,A2,A3 vertically and add ----to get expression
6.4. Binary to Decimal Decoder, BCD to Decimal Decoder and Seven Segment
Display Decoder
Q. a, What is decoder? Write its example and draw the block diagram of decoder.
Ans→ A decoder is a digital circuit (Combinational circuit) that converts coded inputs into coded
outputs where each output represents a unique combination of inputs. It's the opposite
of an encoder, which performs the reverse operation of encoder.
In simpler terms, a decoder takes a binary input and activates one of several outputs
based on the binary pattern it receives.
The selection of 8 outputs can be done based on the three inputs. So, the truth table of this 3 line to
8 line decoder is shown below.
From the following truth table, we can observe that simply one of 8 outputs from DO – D7 can be
selected depending on 3 select inputs.
A B C D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 1 0 0 0 0 0 0 1
In the above circuit, the three inputs can be decoded into 8 outputs
The 3 inverters in the above logic circuit will provide the complement of the inputs & each one of
the AND gates will generate one of the midterms.
In BCD, each digit from 0 to 9 is represented by its corresponding 4-bit binary code. Therefore, the
input to the decoder ranges from 0000 to 1001, representing decimal digits 0 to 9.
BCD to Decimal Decoder Block Diagram:
D0 = A’B’C’D’ (0000)
D1= A’B’C’D (0001)
D2 = A’B’CD’ (0010)
D3= A’B’CD (0011)
D4= A’BC’D’ (0100)
D5 = A’BC’D (0101)
D6 = A’BCD’ (0110)
D7= A’BCD (0111)
D8 = AB’C’D’ (1000)
D9 = AB’C’D (1001)
No.
0
1
2
3
4
5
6
7
8
9
Note –(see only where 1 is available in truth table from horizontally)
• For Common Anode type seven segment LED display, we only have to
and solve using K-map.
• Output for first combination of inputs (A, B, C and D) in Truth Table
corresponds to ‘0’ and last combination corresponds to ‘9’.
• For combination where all the inputs (A, B, C and D) are zero (see Truth
Table), our output lines are a = 1, b = 1, c = 1, d = 1, e = 1, f = 1 and g =
0. So 7 segment display shows ‘zero’ as output.
Similarly, for combination where one of the input is one (D = 1) and rest
are zero,our output lines are a = 0, b = 1, c = 1, d = 0, e = 0, f = 0 and g
= 0. So only LEDs ‘b’ and ‘c’ (see diagram above) will glow and 7
segment display shows ‘one’ as output.
K-Maps:
#for d:
#for a:
#for b:
#for e:
#for c: #for f:
#for g:
6.5. Data Transmissions, 4-to-1 Multiplexer and 8-to-1 Multiplexer
It involves encoding the data into signals suitable for transmission, transmitting those signals
through a medium (such as cables or wireless connections), and decoding the signals back into
usable data at the receiving end.
This process is essential for communication between computers, devices, and networks.
Multiplexers are commonly used in digital systems for various purposes, including data routing,
signal selection, and data transmission.
Inputs: A multiplexer has multiple input lines, typically labeled as D0, D1, D2, ..., Dn, where n is the
number of input lines.
Select Lines: A multiplexer has one or more select lines, often denoted as S0, S1, ..., Sm, where m is
the number of select lines. These select lines determine which input signal is to be transmitted to
the output.
Output: The output of the multiplexer is a single line that carries the selected input signal.
A 4-to-1 multiplexer has four data input lines, two selection line, and one output line. The
select input line determines which of the four data input lines gets transmitted to the output.
The number of select input lines determines the number of input lines the multiplexer can
handle.
B. 8-to-1 Multiplexer: Similarly, an 8-to-1 multiplexer has eight data input lines, one select input
line, and one output line. It operates in the same way as the 4-to-1 multiplexer but with more
input lines, allowing it to select from eight different data sources.
Selection Inputs Output
S2 S1 S0 Y
0 0 0 I0
0 0 1 I1
0 1 0 I2
0 1 1 I3
1 0 0 I4
1 0 1 I5
1 1 0 I6
1 1 1 I7
We can implement 8x1 Multiplexer using lower order Multiplexers easily by considering the above
Truth table.
--------
A decoder decodes an encrypted input signal to multiple A demultiplexer routes an input signal to
Purpose
output signals from one format to another format. multiple output signals.
Input / A decoder has input lines and a maximum of {2} ^ {n} A demultiplexer has single input, selection
Output output lines. lines and maximum of {2} ^ {n} outputs.
Decoders are used to detect bits, encoding of data. Demultiplexers are used in switching, data
Usage
distribution.
Select Lines Decoders have no select lines. Demultiplexers contain select lines.
1x4 De-Multiplexer:In 1 to 4 De-multiplexer, there are total of four outputs, i.e., Y0, Y1, Y2,
and Y3, 2 selection lines, i.e., S0 and S1 and single input, i.e., A. On the basis of the combination of
inputs which are present at the selection lines S0 and S1, the input be connected to one of the
outputs. The block diagram and the truth table of the 1×4 multiplexer are given below.
Block Diagram:
Truth Table:
Y0=S1' S0' A
y1=S1' S0 A
y2=S1 S0' A
y3=S1 S0 A
In 1×16 de-multiplexer, there are total of 16 outputs, i.e., Y0, Y1, …, Y16, 4 selection lines, i.e., S0,
S1, S2, and S3 and single input, i.e., A. On the basis of the combination of inputs which are present at
the selection lines S0, S1, and S2, the input will be connected to one of these outputs. The block
diagram and the truth table of the 1×16 de-multiplexer are given below.
Block Diagram:
Truth Table:
(Note: if you find the zero then put compliment sign otherwise no compliment sign)
Y0=A.S0'.S1'.S2'.S3' (0000)
Y1=A.S0'.S1'.S2'.S3 (0001)
Y2=A.S0'.S1'.S2.S3' (0010)
Y3=A.S0'.S1'.S2.S3 (0011)
Y4=A.S0'.S1.S2'.S3' (0100)
Y5=A.S0'.S1.S2'.S3 (0101)
Y6=A.S0'.S1.S2.S3' (0110)
Y7=A.S0'.S1.S2.S3 (0111)
Y8=A.S0.S1'.S2'.S3' (1000)
Y9=A.S0.S1'.S2'.S3 (1001)
Y10=A.S0.S1'.S2.S3' (1010)
Y11=A.S0.S1'.S2.S3 (1011)
Y12=A.S0.S1.S2'.S3' (1100)
Y13=A.S0.S1.S2'.S3 (1101)
Y14=A.S0.S1.S2.S3' (1110)
Y15=A.S0.S1.S2.S3 (1111)
===================================================================
Unit 7. Sequential Logic Circuits [8 Hrs.]
Q.a, What is Sequential Logic Circuit ?
Ans→
A sequential circuit is a type of digital circuit that utilizes memory elements, such as flip-flops,
registers or Counters to store and process information. It produces outputs based on both current
inputs and the circuit's previous state, allowing it to perform tasks that require memory and time-
dependent processing.
Sequential logic circuits are widely used in digital systems such as:
-computers
-calculators, and
-control systems to perform complex operations and store data.
7.1 Flip-Flops
Flip-flops are fundamental building blocks of sequential logic circuits. They are electronic circuits
capable of storing a single bit of binary information (either a 0 ora 1).
Flip-flops have two stable states, typically labeled as "set" or “1” and "reset" or "0"
.
They can change their state based on control signals, clock pulses, or the state of other flip-flops
in the circuit.
Flip-flops serve as memory elements within sequential circuits, allowing for the storage and
manipulation of data and the implementation of sequential logic operations.
A JK flip-flop is a sequential logic circuit that stores and outputs a single bit ofdata. It has inputs
for both the present state (J) and the complement of the present state (K), allowing for flexible
operation and toggling behavior.
7.1.4 T-Flip-Flop and Truth Table The Truth Table of T flip-flop
A T flip-flop, also known as a toggle flip-flop, is a type of flip-flop circuit that changes its
output state based on the input T (toggle) signal. It is capable of toggling between two
states, either preserving the current state or changing it.
In this combination of two JK flip flop, one acts as a master flip flop and the other acts as a
slave flip flop. In this master-slave flip flop, the outputs of the master JK flip flop are
connected to the inputs of the slave JK flip flop. The outputs of the slave flip flop are fed
back to the inputs of the master JK flip flop.
In the master-slave JK flip flop, a NOT gate (Inverter) is also used which is connected to clock signal
in a manner that the inverted clock signal is applied to the slave flip flop.
Therefore, when clock signal to master flip flop is 0, then for slave flip flop the clocksignal is 1,
and if the clock signal to master flip flop is 1, then for the slave flip flop it 0.
J K Qn+1
0 0 Qn No Change
0 1 0 Reset
1 0 1 Set
1 1 Qn' Toggle
1. Memory Elements: Flip-flops are widely used as basic building blocks for creating
memory elements in digital systems. They can store and retain binary information, allowing
the system to remember and process data.
2. Counters and Timers: Flip-flops are utilized in counters and timers to keep track of events
or time intervals
3. State Registers: Flip-flops are used in state registers to store and represent the current state
of a system or a process.
4. Synchronization and Clocking: Flip-flops are employed in synchronization circuits to
control the flow of data between different components of a digital system.
5. Data Storage and Transfer: Flip-flops are essential in data storage and transferoperations,
such as shift registers. Shift registers are used to shift data in or out serially, making them
useful in applications like data communication, data serialization, and data buffering.
6. Frequency Division: Flip-flops can be used to divide the frequency of an inputsignal. By
toggling the flip-flop at a certain rate, enabling frequency division circuits.
7. Digital Logic Functions: Such as counters, registers, and state machines.
7.2. Shift-Registers
Question: What is shift Register?
Ans→ A group of flip flops which is used to store multiple bits of data and the data is
moved from one flip flop to another is known as Shift Register. The bits stored in registers
shifted when the clock pulse is applied within and inside or outside the registers.
To form an n-bit shift register, we have to connect n number of flip flops. So, the number
of bits of the binary number is directly proportional to the number of flip flops. The flip flops
are connected in such a way that the first flip flop's output becomes the input of the other
flip flop.
A Shift Register can shift the bits either to the left or to the right. A Shift Register, which
shifts the bit to the left, is known as "Shift left register", and it shifts the bit to the right,
known as "Right left register".
Initially, all the flip-flops are set in "reset" condition i.e. Y3 = Y2 = Y1 = Y0 = 0. If we pass the
binary number 1111, the LSB bit of the number is applied first to the Din bit. The D3 input
of the third flip flop, i.e., FF-3, is directly connected to the serial data input D3. The output
Y3 is passed to the data input d2 of the next flip flop. This process remains the same for the
remaining flip flops.
2) Arithmetic Left Shift: In an arithmetic left shift, bits are shifted to the left, with the least
significant bit being shifted out. It's used for multiplication by powers of two in signed
binary multiplication.
7.2.3. Serial-in Serial-out (SISO) Shift Register
→The shift register, which allows serial input (one bit after the other through a single data line)
and produces a serial output is known as a Serial-In Serial-Out shift register. Since there is only
one output, the data leaves the shift register one bit at a time in a serial pattern, thus the name
Serial-In Serial-Out Shift Register.
The logic circuit given below shows a serial-in serial-out shift register. The circuit consists of
four D flip-flops which are connected in a serial manner. All these flip-flops are synchronous with
each other since the same clock signal is applied to each flip-flop.
The above circuit is an example of a shift right register, taking the serial data input from the left
side of the flip-flop and producing a parallel output. They are used in communication lines where
demultiplexing of a data line into several parallel lines is required because the main use of the
SIPO register is to convert serial data into parallel data.
7.2.5. Parallel-in Serial-out (PISO)Shift Register
The shift register, which allows parallel input (data is given separately to each flip flop and in a
simultaneous manner) and produces a serial output is known as a Parallel-In Serial-Out shift
register.
The logic circuit given below shows a parallel-in-serial-out shift register. The circuit consists of
four D flip-flops which are connected. The clock input is directly connected to all the flip-flops
but the input data is connected individually to each flip-flop.
A Parallel in Serial Out (PISO) shift register is used to convert parallel data to serial data.
A Parallel in Parallel out (PIPO) shift register is used as a temporary storage device and like SISO
Shift register it acts as a delay element.
7.2.7. Applications of Shift Registers
1) Serial-to-Parallel and Parallel-to-Serial Conversion: Convert data between serial
and parallel formats efficiently.
2) Data Storage: Temporarily store data for buffering, delay, or memory purposes.
3) Serial Data Transmission: Serialize and deserialize data for communication over
serial channels.
4) Counting: Count clock pulses for applications like frequency dividers or digital
clocks.
5) Arithmetic Operations: Perform simple arithmetic operations like multiplication
and division.
6) LED Displays and Drivers: Control multiple LEDs with fewer pins in display
systems.
7) Test Pattern Generation: Generate test patterns for digital circuit testing.
7.3. Counters
Q,What is counter?
→ A Counter is a device which stores (and sometimes displays) the number of times a
particular event or process has occurred, often in relationship to a clock signal. Not only
counting, a counter can follow the certain sequence based on our design like any random
sequence 0,1,3,2… .They can also be designed with the help of flip flops.
Counters are sequential circuit that count the number of pulses can be either in binary code
or BCD form. The main properties of a counter are timing, sequencing, and counting.
There are two modes of counters they are:
• Up counter
• Down counter
→ Synchronous counter is a type of digital counter circuit where all flip-flops (or stages)
within the counter change state simultaneously in response to a clock signal.
In other words, the flip-flops are clocked together, ensuring that each stage transitions at the
same time.
7.3.2. Ripple Counters
When counting down the count sequence goes in the opposite manner: 111, 110, … 010,
001, 000, 111, 110, … etc.
Ring counter is a type of digital counter circuit where the output of one flip-flop serves as the
input to the next, creating a closed loop or "ring" configuration. It facilitating unidirectional
counting with a single-bit change per clock pulse.
OR
7.3.6. Applications of Counters
==================================================================
Q. What Does LED Display Mean? What are the applications(uses) of LED Display?
Ans→ LED Display (light-emitting diode display) is a screen display technology that uses a panel
of LEDs as the light source.
Currently, a large number of electronic devices, both small and large, use LED display as a
screen and as an interaction medium between the user and the system.
========================Best Wishes====================