24ESC231 - Module 4
24ESC231 - Module 4
ECE
1
24ESC131/231 Basic Electronics Dept. ECE
A binary adder is a combinational circuit that performs the addition of binary digits
or bits. Depending on the design and configuration, there are two types of binary
adders namely, Half Adder and Full Adder.
The half adder is a combinational logic circuit with two inputs and two outputs. The
half adder circuit is designed to add two single-bit binary numbers A and B. It is the
basic building block for the addition of two single-bit numbers. This circuit has two
outputs namely, sum and carry.
2
24ESC131/231 Basic Electronics Dept. ECE
Truth table is one that gives the relationship between inputs and outputs of a logic
circuit and explains the operation of the circuit.
The major drawback of a half adder is that it cannot add the carry obtained from the
addition of the previous stage. To overcome this drawback, full adders are used in
electronic systems.
The main difference between the Full Adder and the previous Half Adder is that a
full adder has three inputs. The same two single bit data inputs A and B as before plus
an additional Carry-in (C-in) input to receive the carry from a previous stage as shown
below.
3
24ESC131/231 Basic Electronics Dept. ECE
In many ways, the full adder can be thought of as two half adders connected together,
with the first half adder passing its carry to the second half adder as shown.
4
24ESC131/231 Basic Electronics Dept. ECE
• Full adders are used in ALUs (arithmetic logic units) of CPUs of computers.
• Full adders are also used to realize critic digital circuits like multiplexers.
5
24ESC131/231 Basic Electronics Dept. ECE
A sequential circuit is a logic circuit that consists of a memory element to store history
of past operation of the circuit. Therefore, the output of a sequential circuit depends
on present inputs as well as past outputs of the circuit.
The block diagram of a typical sequential circuit is shown in the following figure
The sequential circuits are named so because they use a series of latest and previous
inputs to determine the new output.
4.2.1 Latch
In digital electronics, a latch is an asynchronous sequential circuit that can store 1-bit
information. It is used as the fundamental memory element in digital circuits.
A latch can have two stable states namely, set and reset. The set state is denoted by
the logic 1 and the reset state is represented by the logic 0. Due to these two stable
states, a latch is also known as a bistable-multivibrator. The state of a latch toggles
according to the applied input.
The most important thing to be noted about latches is that they do not have a clock
signal for synchronization. That is why they are called asynchronous sequential
circuits.
• Latches can store 1-bit of digital information that can be represented using
either logic 0 or logic 1. Thus, the latches are mainly used as memory elements
in digital circuits.
6
24ESC131/231 Basic Electronics Dept. ECE
• Latches have a feedback mechanism that allows them to maintain their current
state as it is until the next input is applied.
4.2.3 SR Latch
The SR latch is a type of latch which has two input lines designated as S and R. Where,
S represents the Set input and R represents the Reset input. Thus, it is also known as
Set-Reset Latch.
The SR latch has two stable states namely Set state (S) and Reset state (R). The block
diagram of the SR latch is shown in the following figure.
In the case of SR latch, the S input sets the output Q to 1 and Q' to 0. On the other hand,
the R input sets the output Q to 0 and Q' to 1. In case, when both S and R inputs are
high, the latch is said to be in forbidden state.
The complete operation of the SR latch for different input combinations is described
in the following truth table
7
24ESC131/231 Basic Electronics Dept. ECE
Case 1: S’ = R’ = 1 (S = R = 0)
Case 2: S’ = 0, R’ = 1 (S = 1, R = 0)
8
24ESC131/231 Basic Electronics Dept. ECE
Case 3: S’ = 1, R’ = 0 (S = 0, R = 1)
Case 4: S’ = R’ = 0 (S = R = 1)
When S = R = 1, both Q and Q’ becomes 1 which is not allowed. So, the input condition
is prohibited.
A flip-flop is a sequential digital electronic circuit having two stable states that can be
used to store one bit of binary data. Flip-flops are the fundamental building blocks of
all memory devices.
Types of Flip-Flops
• S-R Flip-Flop
• J-K Flip-Flop
• D Flip-Flop
• T Flip-Flop
9
24ESC131/231 Basic Electronics Dept. ECE
In the flip flop, with the help of preset and clear when the power is switched ON, the
states of the circuit keep on changing, that is it is uncertain. It may come to set(Q=1)
or reset(Q’=0) state. In many applications, it is desired to initially set or reset the flip
flop that is the initial state of the flip flop that needs to be assigned. This thing is
accomplished by the preset (PR) and the clear (CLR).
• Case 1: Let’s say, S=0 and R=0, then output of both AND gates will be 0 and
the value of Q and Q’ will be same as their previous value, i.e, Hold state.
• Case 2: Let’s say, S=0 and R=1, then output of both AND gates will be 1 and 0,
correspondingly the value of Q will be 0 as one of input is 1 and it is a NOR
gate so it will ultimately give 0, hence Q gets 0 value, similarly Q’ will be 1.
• Case 3: Let’s say, S=1 and R=0, then output of both AND gates will be 0 and 1,
correspondingly the value of Q’ will be 0 as one of input to NOR gate is 1, so
output will be 0 ultimately and these 0 values will go as input to upper NOR
gate, and hence Q will become 1.
• Case 4: Let’s say, S=1 and R=1, then output of both AND gates will be 1 and 1
which is invalid, as the outputs should be complement of each other.
There are several advantages to using an SR flip-flop. Some of them are listed below:
Apart from several advantages, there are some limitations associated with SR flip-
flops. Some of them are listed below:
• Invalid states: If both the set and reset inputs are activated at the same time,
the SR flip-flop can enter an invalid state where both outputs are high, or both
are low. This can lead to unpredictable behaviour in digital systems.
Applications of SR Flipflop:
• Register: SR Flip Flop used to create register. Designer can create any size of
register by combining SR Flip Flops.
11
24ESC131/231 Basic Electronics Dept. ECE
• Memory : SR Flip Flops used to create memory which are used to store data,
when the power is turned off.
• Synchronous System: SR Flip Flop are used in synchronous system which are
used to synchronize the operation of different component.
The D flip flop has two inputs, data and clock input which controls the flip flop. when
clock input is high, the data is transferred to the output of the flip flop and when the
clock input is low, the output of the flip flop is held in its previous state.
D flip flop consists of a single input D and two outputs (Q and Q’). The basic working
of D Flip Flop is as follows:
• When the clock signal is low, the flip flop holds its current state and ignores the
D input.
• When the clock signal is high, the flip flop samples and stores D input.
• The value that was previously fed into the D input is reflected at the flip flop’s
Q output.
o If D = 0 then Q will be 0.
o If D = 1 then Q will be 1.
12
24ESC131/231 Basic Electronics Dept. ECE
LOW x 0 1 No Change
HIGH 0 0 1 Reset
HIGH 1 1 0 Set
o If Q = 0 then Q’ will be 1.
o If Q = 1 then Q’ will be 0.
• The computation speed of D flip flop is very fast compared to other flip flops.
• D flip flop requires very few components to design which makes it simple to
understand.
• D flip flops are glitch prone. When input varies fast, flip flop output may glitch.
Digital circuit glitches are hard to identify and fix.
• Memory
• Registers
• Counters
• Synchronous System
13
24ESC131/231 Basic Electronics Dept. ECE
4.3.3 JK Flip-Flop
The JK flip-flop is the form of sequential circuits which are applied as the basic
elements of the digital memory. It is known to be flexible and is applied in different
systems in the digital platform. This JK flip-flop has two input lines J and K, clock line
CLK, clear line CLR as well as preset line PR. Q and Q’ are its two output which are
usually in the opposite state while operating. The JK flip-flop can also be called a
bistable multivibrator since it has two stable steady states.
The JK flip flop diagram below represents the basic structure which consists of Clock
(CLK), Clear (CLR), and Preset (PR).
The working of a JK Flip Flop can be understood by analysing how the inputs J and
K affect the output states:
14
24ESC131/231 Basic Electronics Dept. ECE
o J = 0, K = 0: When both inputs are 0, the flip-flop retains its previous state,
whether it's set or reset.
This toggling behaviour is what makes the JK Flip Flop superior to the SR flip-flop,
especially in clocked circuits.
The race around condition in a JK Flip Flop occurs when the clock pulse duration is
longer than the propagation delay of the flip-flop, causing the output to toggle
multiple times within the same clock cycle. This can lead to unstable outputs,
especially in high-speed circuits.
The master-slave JK Flip Flop configuration helps eliminate this issue by ensuring that
the inputs are latched and only toggled once per clock cycle. Another way to resolve
this condition is by shortening the clock pulse duration or using edge-triggered flip-
flops.
The JK Flip Flop offers several advantages that make it a preferred choice in sequential
logic circuits:
o Toggling Functionality
o Versatility
o Edge-Triggered Configuration
The JK Flip Flop finds widespread application in various digital electronics systems:
o Counters: Its toggling capability makes it the perfect candidate for use in
binary and decade counters.
15
24ESC131/231 Basic Electronics Dept. ECE
o State Machines: JK Flip Flops are used in finite state machines, where the
system needs to toggle between states based on inputs.
o Clock Dividers: They can be used to divide the frequency of clock pulses in
clocked circuits.
The T flip-flop is also called toggle flip-flop. The T flip-flop is achieved by connecting
the inputs ‘J’ and ‘K’. When T = 0, both AND gates are disabled. Therefore, there is no
change in the output. When T= 1, the output toggles.
16
24ESC131/231 Basic Electronics Dept. ECE
The T Flip-Flop has one input. When the input is 1 then its output toggles. The present
state of the flip-flop is Qn then with T = 1, if Qn = 0 then in the next state, the output
of the flip-flop Qn+1 will become 0. And similarly, currently if Qn is 1 then in the next
state, the output will become 0.
With T = 1 input, since the output of the flip-flop toggles at every clock pulse, so it is
known as T flip-flop. When T = 0, then the flip-flop will remain in the same state.
There are numerous applications of T Flip Flop in Digital System, which are listed
below:
• Counters
• Data Storage
• Frequency division
• Shift registers
4.5 Embedded Systems
17
24ESC131/231 Basic Electronics Dept. ECE
An embedded system is a
A computer is a general-purpose
specialized computer system
Basic electronic device used to perform
that used to perform one or a
different types of tasks.
few specific tasks.
18
24ESC131/231 Basic Electronics Dept. ECE
19
24ESC131/231 Basic Electronics Dept. ECE
The application areas and the products in the embedded domain are countless. A few
of the important domains and products are listed below:
(3) Home automation and security systems: Air conditioners, sprinklers, intruder
detection alarms, closed circuit television cameras, fi re alarms, etc.
(4) Automotive industry: Anti-lock breaking systems (ABS), engine control, ignition
systems, automatic navigation systems, etc.
(7) Computer networking systems: Network routers, switches, hubs, firewalls, etc.
20
24ESC131/231 Basic Electronics Dept. ECE
(10) Banking & Retail: Automatic teller machines (ATM) and currency counters, point
of sales (POS)
(11) Card Readers: Barcode, smart card readers, hand held devices, etc.
(12) Wearable Devices: Health and Fitness Trackers, Smartphone Screen extension for
notifications, etc.
Embedded system is designed to serve the purpose of any one or a combination of the
following tasks:
(4) Monitoring
(5) Control
Data Collection/Storage/Representation
Data Communication
21
24ESC131/231 Basic Electronics Dept. ECE
✓ Network hubs, Routers, switches, Modems etc are typical examples for
dedicated data transmission embedded systems.
Monitoring
✓ Measuring instruments like Digital CRO, Digital Multi meter, Logic Analyzer
etc used in Control & Instrumentation applications are also examples of
embedded systems for monitoring purpose.
Control
✓ Embedded systems with control functionalities are used for imposing control
over some variables according to the changes in input variables
✓ Embedded system with control functionality contains both sensors and
actuators
✓ Sensors are connected to the input port for capturing the changes in
environmental variable or measuring variable
✓ The actuators connected to the output port are controlled according to the
changes in input variable to put an impact on the controlling variable to bring
the controlled variable to the specified range
4. Distributed
6. Power concerns
22
24ESC131/231 Basic Electronics Dept. ECE
✓ Certain Embedded systems are designed to react to the events that occur in the
nearby environment.
✓ These events also occur real-time. Example: An air conditioner adjusts its
mechanical parts as soon as it gets a signal from its Sensors to increase or
decrease the temperature when the user operates it using a remote Control.
✓ An embedded system uses Sensors to take inputs and has actuators to bring
out the required functionality.
4. Distributed
✓ Certain embedded systems are part of a larger system and thus form
components of a distributed system.
✓ These components are independent of each other but have to work together for
the larger system to function properly.
✓ Example. A car has many embedded systems controlled to its dash board. Each
one is an independent embedded system yet the entire car can be said to
function properly only if all the systems work together
✓ An embedded system that is compact in size and has light weight will be
desirable or more popular than one that is bulky and heavy.
✓ Example. Currently available cell phones. The cell phones that have the
maximum features are popular but also their size and weight is an important
characteristic.
✓ For convenience users prefer mobile phones than phablets. (phone + tablet pc)
23
24ESC131/231 Basic Electronics Dept. ECE
6. Power concerns
✓ It is desirable that the power utilization and heat dissipation of any embedded
system be low. If more heat is dissipated then additional units like heat sinks
or cooling fans need to be added to the circuit.
✓ If more power is required then a battery of higher power or more batteries need
to be accommodated in the embedded system.
Questions:
24