Nothing Special   »   [go: up one dir, main page]

Digital Electronics - Arun

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 45

UNIT 4

DIGITAL ELECTRONICS
Binary Number System
• The binary number system is a base-2 numbering system that uses
only two digits, 0 and 1, to represent numbers. It is the foundation of
all digital systems and is commonly used in computers, digital
electronics, and other areas of technology. Here's how binary
numbers work, how to convert them to and from decimal (base-10),
and some basic binary operations.
Binary Number System Conversion and
representation
• 1. Binary Representation: In the binary number system, each digit
represents a power of 2. The rightmost digit is the least significant bit
(LSB), and the leftmost digit is the most significant bit (MSB).

• Binary numbers can be manipulated using operations like addition,


subtraction, multiplication, and division, which are similar to their
decimal counterparts. For example, to add two binary numbers, align
them by their positions (similar to carrying over in decimal addition)
and add digit by digit, considering any carryovers.
Logic Levels High and Low
• In digital electronics, logic levels refer to the two distinct voltage levels
used to represent binary information (0 and 1) in digital circuits. These
levels are typically denoted as "logic level high" and "logic level low."
• Logic Level High (1):
• Logic level high is associated with the binary digit "1."
• It represents the "on" state or a true condition in digital systems.
• Typically, a voltage near the supply voltage (Vcc) is used to indicate a logic level
high. In most cases, it's close to the maximum voltage the system can handle.
• The actual voltage used for a logic level high depends on the specific technology
and voltage standards being used. Common voltage levels for logic high include
3.3 volts (for TTL logic) or 5 volts (for older TTL and some CMOS logic).
Logic Level
• Logic Level Low (0):
• Logic level low is associated with the binary digit "0."
• It represents the "off" state or a false condition in digital systems.
• Typically, a voltage near zero volts or ground (0V) is used to indicate a logic level low.
• Like logic level high, the actual voltage for logic level low depends on the technology. It's often very
close to 0V for most digital systems.
• The distinction between logic level high and low is essential for digital circuits to process
and transmit information accurately. This binary representation allows digital devices to
communicate, perform logical operations, and store data in a manner that is highly
reliable and resistant to noise and interference.
• Different digital logic families (e.g., TTL, CMOS, ECL) may have specific voltage level
standards for logic high and low, so it's important to know the standards used in a
particular system to ensure proper operation and compatibility between different
components.
Boolean algebra
• Boolean algebra is a branch of mathematics and a formal system used
in computer science and logic for working with binary variables and
operations. It was developed by George Boole in the mid-19th
century and provides a set of rules and principles for manipulating
binary values, typically represented as 0 and 1, using logical
operations. Boolean algebra is fundamental to digital circuit design,
computer programming, and many aspects of computer science and
information technology.


Example of Binary to Decimal Conversion:

Convert the binary number (1101)2 into a decimal number.


Solution:
Given binary number = (1101)2
Now, multiplying each digit from MSB to LSB with reducing the power of the
base number 2.
1 × 23 + 1 × 2 2 + 0 × 21 + 1 × 2 0
=8+4+0+1
= 13
Thus, the equivalent decimal number for the given binary number (1101)2 is
(13)10
Convert the binary number 1001 to a decimal number.

• Solution:

Given, binary number = 10012


Hence, using the binary to decimal conversion formula, we have:
10012 = (1 × 2³) + (0 × 2²) + (0 × 2¹) + (1 × 2⁰)
=8+0+0+1
= (9)₁₀
Decimal to binary
Convert (100)decimal to binary
Boolean algebra laws and expression
Boolean expression
• A logical statement that results in a Boolean value, either be True or
False, is a Boolean expression. Sometimes, synonyms are used to
express the statement such as ‘Yes’ for ‘True’ and ‘No’ for ‘False’.
• Also, 1 and 0 are used for digital circuits for True and False,
respectively.
• Boolean expressions are the statements that use logical operators, i.e.,
AND, OR, XOR and NOT. Thus, if we write X AND Y = True, then it
is a Boolean expression
• DE MORGAN’S THEOREM

• (A+B)’ = A’.B’

• (A.B)’ = A’+B’
Logic Gates
• There are 3 types of logic gates-
• 1) Basic Gates: OR, AND, and NOT Gates.

• 2) Universal Gates: NAND, and NOR Gates.

• 3) Derived Gates: XOR Gates, and XNOR Gates.

• Let’s understand all three logic gates in depth.


Digital Logic
• Binary system -- 0 & 1, LOW & HIGH,
negated and asserted.
• Basic building blocks -- AND, OR, NOT
AND, OR, NOT Gates
OR Gate:
A OR B = A + B ( Logical OR)
implies AdditioN
AND GATE
• A AND B = A.B (Logical Multiplication)
NOT GATE (inversion)
EX –OR Gate
An exclusive OR gate (XOR gate) is a digital logic gate that produces a
high output when one of the inputs is high. If both inputs are low or
high, the output is low.
NAND Gate
NAND is an abbreviation for “NOT
AND.” A two-input NAND gate is a
digital combination logic circuit
that performs the logical inverse of
an AND gate.
While an AND gate outputs a
logical “1” only if both inputs are
logical “1,” a NAND gate outputs a
logical “0” for this same
combination of inputs. The symbol
and truth table for a NAND gate is
shown in Figure
• The NOR gate is a digital logic
NOR gate gate that implements logical
NOR - .
NOR
GATE
• A HIGH output (1) results if
both the inputs to the gate are
LOW (0);
• if one or both input is HIGH
(1), a LOW output (0) results.
NOR is the result of the
negation of the OR operator.
Basic gates using NAND gate
1. Implementation of AND Gate using Universal gates.

a) Using NAND Gates


The AND gate can be implemented by using two NAND gates in the below
fashion:
Basic gates using NOR gate
• b) Using NOR Gates
• Implementation of AND gate using only NOR gates as shown below:
Implementation of OR Gate using Universal gates.

• a) Using NAND Gates


The OR gate can be implemented using the NAND gate as
below:
Combinational and Sequential Logic circuit
• The combinational circuit is time-independent.
• The output it generates does not depend on any of its previous
inputs.
• On the other hand, sequential circuits are the ones that depend on
clock cycles.
• They depend entirely on the past as well as the present inputs for
generating output.
What is a Combinational Circuit?

• The output of a Combinational Circuit depends entirely on the present input.


• It exhibits a faster speed.
• It is comparatively easier to design.
• No feedback is present between the input and output.
• The combinational circuit depends on time.
• Logic gates form the building blocks of such circuits.
• One can make use of it for both boolean and arithmetic operations.
• They don’t hold the capacity of storing any state.
• These circuits do not have a clock- thus, they don’t require triggering.
• They do not possess any memory element.
• Users can feasibly use as well as handle them.
• Example – Demultiplexer, Multiplexer, Decoder, Encoder, etc.
Half Adder
• Combinational logic circuit for half adder
• Half adder has 2 i/p and 2o/p (sum and Carry)
Full adder
• Full adder has 3 i/p and 2 o/p
What is a Sequential Circuit?

• The output of a Sequential Circuit depends on both- past as well as present inputs.
• It works at a comparatively slower speed.
• The design of these circuits is comparatively much tougher than the Combinational Circuit.
• A feedback path exists between the output and the input.
• The circuit is time-dependent.
• Flip-flops constitute the building blocks of such a circuit.
• People mainly use them for storing data and information.
• They possess the capability of storing any data state or retaining an earlier state at any given point.
• Because a Sequential circuit depends on a clock, it usually requires triggering.
• They always possess a memory element.
• A user may not be able to handle and use these circuits easily.
• For Example – Counters, Flip-flops, etc.
S-R Latch using NAND /NOR Gate
• When using static gates as building blocks, the most fundamental
latch is the simple SR latch, where S and R stand for set and reset. It
can be constructed from a pair of cross-coupled NOR or NAND logic
gates. The stored bit is present on the output marked Q.
• The circuit shown below is a basic NAND latch. The inputs are
generally designated S and R for Set and Reset respectively. Because
the NAND inputs must normally be logic 1 to avoid affecting the
latching action, the inputs are considered to be inverted in this circuit
(or active low).
What is the difference between an SR latch
using a NAND gate and a NOR gate?
• An SR latch (Set-Reset Latch) is a fundamental electronic circuit used
in digital electronics, and it can be implemented using either NAND
gates or NOR gates.
• The main difference between an SR latch using a NAND gate and a
NOR gate is in the way the two gates handle input signals. In an SR
latch using NAND gates, the circuit is designed such that both S and
R inputs are inverted and then fed into a two-input NAND gate.
Whereas in an SR latch using NOR gates, the circuit is designed such
that both S and R inputs are fed into a two-input NOR gate.
Here are the differences in the truth tables
and operation of both types of SR latch:
• SR Latch with NAND Gates:
• S = 0, R = 0: Q and Q̅ hold their previous states.
• S = 0, R = 1: Q = 0, Q̅ = 1 (reset condition).
• S = 1, R = 0: Q = 1, Q̅ = 0 (set condition).
• S = 1, R = 1: Undefined state.

• SR Latch with NOR Gates:


• S = 0, R = 0: Q and Q̅ hold their previous states.
• S = 0, R = 1: Q = 0, Q̅ = 1 (reset condition).
• S = 1, R = 0: Q = 1, Q̅ = 0 (set condition).
• S = 1, R = 1: Invalid condition (both outputs are at 0).
SR Flip Flop
Flip flop is a term which comes under digital
electronics, and it is an electronic component • What is SR Flip Flop?
which is used to store one single bit of the • It is a Flip Flop with two inputs,
information. digital electronics, and it is an electronic co one is S and other is R. S here
stands for Set and R here stands
for Reset. Set basically indicates
set the flip flop which means
output 1 and reset indicates
resetting the flip flop which
means output 0. Here clock pulse
is supplied to operate this flop
flop, hence it is clocked flip flop.
Truth table of S-R flip flop
J-K flip flop
J-K flip flop
• This simple JK flip Flop is the most widely used of all the flip-flop
designs and is considered to be a universal flip-flop circuit. The two
inputs labelled “J” and “K” are not shortened abbreviated letters of
other words, such as “S” for Set and “R” for Reset, but are themselves
autonomous letters chosen by its inventor Jack Kilby to distinguish the
flip-flop design from other types.
J-K flip flop
• The JK flip flop is basically a gated SR flip-flop with the addition of a
clock input circuitry that prevents the illegal or invalid output
condition that can occur when both inputs S and R are equal to logic
level “1”. Due to this additional clocked input, a JK flip-flop has four
possible input combinations, “logic 1”, “logic 0”, “no change” and
“toggle”
D-Flip Flop
• D Flip-Flop (Data Flip-Flop): The D flip-flop, also known as a Data or
Delay flip-flop.
• It has a data input (D) and a clock input (CLK).
• It stores the value at the D input when the clock signal transitions,
effectively latching the data.
D flip flop circuit and Truth table
Applications of Flip flops
• They are widely used in digital systems,
• including microprocessors,
• memory devices, and
• various control systems.
• Depending on the specific requirements of a digital circuit,
different types of flip-flops can be chosen to implement
the desired functionality.
Summary of flip flops
• A flip-flop is a digital electronic circuit that can store one bit of
information, which can be either a 0 or a 1.

• It is a fundamental building block in digital electronics and is used to


store and synchronize data in various applications, such as memory
units, registers, and sequential logic circuits.

• Flip-flops are crucial for creating sequential and clocked digital


circuits.
Types of Flip flop
• SR Flip-Flop (Set-Reset Flip-Flop): An SR flip-flop has two inputs, S (set)
and R (reset), which can be used to set or reset the output. It can be
sensitive to the level of inputs or the edges of a clock signal.
• JK Flip-Flop: The JK flip-flop has three inputs: J (set), K (reset), and a
clock input. It has behavior similar to the SR flip-flop but with additional
functionality to toggle its output state when J and K are both active.
• D Flip-Flop (Data Flip-Flop): The D flip-flop, also known as a Data or
Delay flip-flop, has a data input (D) and a clock input (CLK). It stores the
value at the D input when the clock signal transitions, effectively
latching the data.
4-bit binary counter and 4 stage shift register
• A 4-bit binary counter is a digital circuit that counts in binary from
0000 to 1111 and then repeats the sequence. It's a common
component in digital electronics and can be used for various
applications, such as sequencing through states, generating timing
signals, and more.
4 Stage Shift Register
• Define Register: A register can store data ,which Is entered into it.
• Data can be taken out when needed.

• Data are entered and stored in shift register.


• It can be taken out when needed

You might also like