GAEST305
DIGITAL ELECTRONICS AND LOGIC DESIGN
Introduction to digital Systems :-
Digital abstraction
• Digital abstraction refers to the process of interpreting continuous
analog signals as discrete binary values (0s and 1s) in digital
circuits.
• This abstraction allows for the simplification of complex electronic
systems by representing real-world signals in a format that digital
devices can process.
• Essentially, it enables the design and implementation of digital
systems by providing a framework for understanding how digital
components interact and function.
Differences Between
Analog and Digital Systems
• In electrical systems, signals represent information that is
transmitted between devices using an electrical quantity
(voltage or current).
• An analog signal is defined as a continuous, time-varying
quantity that corresponds directly to the information it
represents.
• An example of this would be a barometric pressure sensor
that outputs an electrical voltage corresponding to the
pressure being measured.
• As the pressure goes up, so does the voltage.
• While the range of the input (pressure) and output (voltage)
will have different spans, there is a direct mapping between
the pressure and voltage.
Differences Between
Analog and Digital Systems
• In digital signaling the electrical signal itself is not directly the
information it represents; instead, the information is encoded.
• The most common type of encoding is binary (1’s and 0’s). The
1’s and 0’s are represented by the electrical signal.
• The simplest form of digital signaling is to define a threshold
voltage directly in the middle of the range of the electrical
signal.
• If the signal is above this threshold, the signal is representing
a 1.
• If the signal is below this threshold, the signal is representing
a 0.
Number Systems
• 4 different number systems:
• Decimal(10 symbols)
• Binary (2 symbols)
• Octal (8 symbols)
• Hexadecimal (16 symbols)
Positional Number Systems
• The position of the symbol with respect to other symbols in
the number allows an individual symbol to represent greater
(or lesser) values.
• We can use this approach to represent numbers larger than
the original set of symbols.
• For example, let’s say we want to count from 0 upward by 1.
We begin counting 0, 1, 2, 3, 4, 5, 6, 7, 8 to 9.
• When we are out of symbols and wish to go higher, we bring
on a symbol in a different position with that position being
valued higher and then start counting over with our original
symbols (e.g., . . ., 9, 10, 11,... 19, 20, 21,...).
Positional Number Systems Ctnd…
• Radix = Base = the number of numerals in the number
system
Decimal Number System (Base 10)
• Decimal number system contains ten unique numerals
(0, 1, 2, 3, 4, 5, 6, 7, 8 and 9).
• This system is thus a base 10 or a radix 10 system.
• The relative magnitudes of the symbols are 0 < 1 < 2 < 3
< 4 < 5 < 6 < 7 < 8 < 9.
Binary Number System (Base 2)
• The binary number system contains two unique
numerals (0 and 1).
• This system is thus a base 2 or a radix 2 system.
• The relative magnitudes of the symbols are 0 < 1.
• 4 bits – Nibble.
• 8 bits – Byte.
• Larger groupings of bits are called words.
Octal Number System (Base 8)
• The octal number system contains eight unique numerals
(0, 1, 2, 3, 4, 5, 6, 7).
• This system is thus a base 8 or a radix 8 system.
• The relative magnitudes of the symbols are 0 < 1 < 2 < 3
< 4 < 5 < 6 < 7.
• We use the generic term digit to describe the numerals
within an octal number.
Hexadecimal (Base 16)
• The hexadecimal number system contains 16 unique
numerals.
• The 16 numerals in the hexadecimal system are 0, 1, 2,
3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.
• The relative magnitudes of the symbols are 0 < 1 < 2 < 3
< 4 < 5 < 6 < 7 < 8 < 9 < A < B < C < D < E < F.
Base Conversion
• Converting to Decimal
• Weight = (Radix)p
• Total Decimal Value = σ𝑝𝑖=𝑝𝑚𝑖𝑛
𝑚𝑎𝑥
𝑑𝑖 . 𝑟𝑎𝑑𝑖𝑥 𝑖
Binary to Decimal
Octal to Decimal
Hexadecimal to Decimal
Decimal to Binary
Decimal to Octal
Decimal to Hexadecimal
Binary to Octal
Binary to Hexadecimal
Octal to Binary
Hexadecimal to Binary
Octal to Hexadecimal
Hexadecimal to Octal
Binary Arithmetic
• Addition (Carries)
Subtraction (Borrows)
Unsigned and Signed Numbers
• In decimal, we are able to use the negative sign in front of
a number to indicate it is negative (e.g., -3410).
• There is no “-“ in a digital circuit. Since we only have 0’s
and 1’s in the hardware, we use a bit to represent
whether a number is positive or negative.
• This is referred to as the sign bit.
• If a binary number is not going to have any negative
values, then it is called an unsigned number.
• If a binary number is going to allow negative numbers, it
is called a signed number.
Unsigned Numbers
• An unsigned number is one that does not allow negative
numbers.
• The number of unique codes in an unsigned number is
given by 2n. For example, if we had an 8-bit number, we
would have 28 or 256 unique codes (e.g., 0000 00002 to
1111 11112).
• Range of an UNSIGNED number = 0 ≤ Nunsigned ≤ (2n –1)
Signed Numbers
• Sign Magnitude form
• The most significant bit of these numbers
is always the sign bit, which represents
whether the number is positive or
negative.
• The sign bit is defined to be a 0 if the
number is positive and 1 if the number
is negative.
One’s Complement
• One’s complement is another simple way to encode
negative numbers.
• In this approach, the negative number is obtained by
taking its positive equivalent and flipping all of the 1’s to
0’s and 0’s to 1’s.
• This procedure of flipping the bits is called a complement.
• In this way, the most significant bit of the number is still
the sign bit (0 = positive, 1 = negative).
Two’s Complement
• In this approach, the negative number
is obtained by subtracting its positive
equivalent from 2n.
• This is identical to performing a
complement on the positive equivalent
and then adding one.
Digital Circuitry and Interfacing
• The Buffer
• The first basic gate is the buffer. The output of a buffer is simply
the input.
• The logic symbol, truth table, logic function, and logic waveform
for the buffer
• The Inverter
• The output of an inverter is the complement of the input.
• Inversion is also often called the not operation. In spoken word,
we might say “A is equal to not B;” thus this gate is also often
called a not gate.
• The symbol for the inverter is the same as the buffer with the
exception that an inversion bubble (i.e., a circle) is placed on the
output.
• Out = In’
• Out = In
• The AND Gate
• The output of an AND gate will only be true (i.e., a logic 1) if all
of the inputs are true.
• This operation is also called a logical product because if the
inputs were multiplied together, the only time the output would
be a 1 is if each and every input was a 1.
• As a result, the logic operator is the dot (∙). Another notation
that is often seen is the ampersand (&).
• The NAND Gate
• The NAND gate is identical to the AND gate with the exception
that the output is inverted.
• The “N” in NAND stands for “NOT,” which represents the
inversion. The symbol for a NAND gate is an AND gate with an
inversion bubble on the output.
• The logic expression for a NAND gate is the same as an AND
gate but with an inversion bar over the entire operation.
• The OR Gate
• The next basic gate is the OR gate. The output of an OR gate will
be true when any of the inputs are true.
• This operation is also called a logical sum because of its
similarity to logical disjunction in which the output is true if at
least one of the inputs is true.
• As a result, the logic operator is the plus sign (+).
• The NOR Gate
• The NOR gate is identical to the OR gate with the exception that
the output is inverted.
• The symbol for a NOR gate is an OR gate with an inversion
bubble on the output.
• The logic expression for a NOR gate is the same as an OR gate
but with an inversion bar over the entire operation.
• The XOR Gate
• The next basic gate is the exclusive-OR gate or XOR gate for
short.
• This gate is also called a difference gate because for the 2-input
configuration, its output will be true when the input codes are
different from one another.
• The logic operator is a circle around a plus sign
• The XNOR Gate
• The exclusive-NOR gate is identical to the XOR gate with the
exception that the output is inverted.
• This gate is also called an equivalence gate because for the 2-
input configuration, its output will be true when the input codes
are equivalent to one another.
• The symbol for an XNOR gate is an XOR gate with an inversion
bubble on the output.
• The logic expression for an XNOR gate is the same as an XOR
gate but with an inversion bar over the entire operation.
Digital Circuit Operation
• Now we turn our attention to the physical hardware that is
used to build the basic gates just described and how electrical
quantities are used to represent and communicate the binary
values 1 and 0.
• We begin by looking at digital signaling. Digital signaling
refers to how binary codes are generated and transmitted
successfully between two digital circuits using electrical
quantities (e.g., voltage and current).
• The sending circuit is called either the transmitter (Tx) or
driver.
• The receiving circuit (Rx) observes this voltage and is able to
determine the value of the binary code.
• Logic Levels
• A logic level is the term to describe all
possible states that a signal can
have. We will focus explicitly on
circuits that represent binary values,
so these will only have two finite
states (1 and 0).
• To begin, we define a simplistic model
of how to represent the binary codes
using an electrical quantity.
• This model uses a voltage threshold
(Vth) to represent the switching point
between the binary codes.
• If the voltage of the signal (Vsig) is
above this threshold, it is considered
a logic HIGH.
• If the voltage is below this threshold,
it is considered a logic LOW.
• It is straightforward to have the HIGH level
correspond to the binary code 1 and the
LOW level correspond to the binary code 0;
however, it is equally valid to have the HIGH
level correspond to the binary code 0 and the
LOW level correspond to the binary code 1.
• As such, we need to define how the logic
levels HIGH and LOW map to the binary
codes 1 and 0.
• We define two types of digital assignments:
positive logic and negative logic.
• In positive logic, the logic HIGH level
represents a binary 1, and the logic LOW
level represents a binary 0.
• In negative logic, the logic HIGH level
represents a binary 0, and the logic LOW
level represents a binary 1
Output DC Specifications
• Transmitting circuits provide specifications on the range of output voltages (VO)
that they are guaranteed to provide when outputting a logic 1 or 0.
• These are called the DC output specifications.
• There are four DC voltage specifications that specify this range: VOH-max, VOH-min,
VOL-max, and VOL-min.
• The VOH-max and VOH-min specifications provide the range of voltages the
transmitter is guaranteed to provide when outputting a logic HIGH (or logic 1
when using positive logic).
• The VOL-max and VOL-min specifications provide the range of voltages the
transmitter is guaranteed to provide when outputting a logic LOW (or logic 0
when using positive logic).
• In the subscripts for these specifications, the “O” signifies “output” and the “L” or
“H” signifies “LOW” or “HIGH,” respectively.
Input DC Specifications
• Receiving circuits provide specifications on the range of input
voltages (VI) that they will interpret as either a logic HIGH or
LOW. These are called the DC input specifications.
• There are four DC voltage specifications that specify this
range: VIH-max, VIH-min, VIL-max, and VIL-min.
• The VIH-max and VIH-min specifications provide the range of
voltages that the receiver will interpret as a logic HIGH (or
logic 1 when using positive logic).
• The VIL-max and VIL-min specifications provide the range of
voltages that the receiver will interpret as a logic LOW (or logic
0 when using positive logic).
• In the subscripts for these specifications, the “I” signifies
“input.”
Noise Margins
• Since there will always be some amount of loss in any interconnect
system, the specifications for VIH-min are always less than VOH-min.
• The difference between these two quantities is called the noise
margin.
• More specifically, it is called the noise margin HIGH (NMH) to signify
how much margin is built into the Tx/Rx circuit when
communicating a logic 1.
• Similarly, the VILmax specification is always higher than the VOL-max
specification to account for any voltage added to the signal in the
interconnect.
• The difference between these two quantities is called the noise
margin LOW (NML) to signify how much margin is built into the
Tx/Rx circuit when communicating a logic 0.
Power Supplies
• All digital circuits require a power supply voltage and a ground.
There are some types of digital circuits that may require multiple
power supplies.
• For simplicity, we will focus on digital circuits that only require a
single power supply voltage and ground. The power supply voltage
is commonly given the abbreviations of either VCC or VDD.
• The “CC” and “DD” have to do with how the terminals of the
transistors inside of the digital circuit are connected (i.e., “collector
to collector” or “drain to drain”).
• Digital circuits will specify the required power supply voltage.
• Ground is considered an ideal 0v. Digital circuits will also specify
the maximum amount of DC current that can flow through the VCC
(ICC) and GND (IGND) pins before damaging the part.
• There are two components of power supply current.
• The first is the current that is required for the functional operation
of the device. This is called the quiescent current (Iq).
• The second component of the power supply current is the output
currents (IO). Any current that flows out of a digital circuit must
also flow into it.
• When a transmitting circuit sources current to a load on its output
pin, it must bring in that same amount of current on another pin.
• This is accomplished using the power supply pin (VCC).
• Conversely, when a transmitting circuit sinks current from a load
on its output pin, an equal amount of current must exit the circuit
on a different pin. This is accomplished using the GND pin.
• This means that the amount of current flowing through the VCC
and GND pins will vary depending on the logic states that are being
driven on the outputs.
• Since a digital circuit may contain numerous output pins, the
maximum amount of current flowing through the VCC and GND
pins can scale quickly and care must be taken not to damage the
device.
Driving Loads
• From this example, it is clear
that there are no issues when a
gate is driving another gate
from the same family.
• This is as expected because
that is the point of a logic
family. In fact, gates are
designed to drive multiple gates
from within their own family.
• Based solely on the DC
specifications for input and
output current, it could be
assumed that the number of
other gates that can be driven
is simply IO-max/II-max.
Driving Resistive Loads
• There are many situations where a resistor is the load in a digital
circuit.
• A resistive load can be an actual resistor that is present for some
other purpose such as a pull-up, pull-down, or for impedance
matching.
• More complex loads such as buzzers, relays, or other electronics
can also be modeled as a resistor.
• When a resistor is the load in a digital circuit, care must be taken
to avoid violating the output current specifications of the driver.
• The electrical circuit analysis technique that is used to evaluate
how a resistive load impacts a digital circuit is Ohm’s law.
• Ohm’s law is a very simple relationship between the current and
voltage in a resistor.
Driving LEDs
• A light-emitting diode (LED) is a very common type of load
that is driven using a digital circuit.
• The behavior of diodes is typically covered in an analog
electronics class.
• A diode has two terminals, the anode and cathode.
Current that flows from the anode to the cathode is called
the forward current.
• A voltage that is developed across a diode from its anode
to cathode is called the forward voltage.
• The amount is specified as the LED’s forward voltage (Vf)
and is typically between 1.5v and 2v in modern LEDs.
• When a power supply circuit is connected to the LED, no
current will flow until this forward voltage has been
reached.
• Once it has been reached, current will begin to flow, and
the LED will prevent any further voltage from developing
across it.
• Once current flows, the LED will begin emitting light. The
more current that flows, the more light that will be
emitted up until the point that the maximum allowable
current through the LED is reached and then the device
will be damaged.