DLD Notes
DLD Notes
Analog Systems: An analog system contains devices that manipulate physical quantities that
are represented in analog form; that is, the quantities can vary over a continuous range of
values.
Advantages Limitations
1) Easier to design
2) Information storage is easy
3) Accuracy & precision is easier to
maintain 1. The real world is analog
4) Operation can be programmed 2. Processing digital signals takes time
5) Circuits are less affected by noise
6) More digital circuitry can be fabricated
on IC chips
1
Converting Analog to Digital Form: Analog to Digital Converter (ADC) works as follows:
Sample the analog signal
Quantify it to determine the Resolution
Set binary values
Send the digital values
2
Memory: When an input signal is applied to most devices or circuits, the output somehow
changes in response to the input, and when the input signal is removed, the output returns to
its original state. These circuits do not exhibit the property of memory because their outputs
revert back to normal. In digital circuitry certain types of devices and circuits do have memory.
When an input is applied to such a circuit, the output will change its state, but it will remain in
the new state even after the input is removed. This property of retaining its response to a
momentary input is called memory.
Microcomputer VS Microcontroller:
Microcomputer Microcontroller
Serial Parallel
1-bit transfers at one clock pulse 8-bits transfers at one clock pulse
3
Chapter 2
Number System Conversion:
4
Hex -> Decimal: (Weight Based)
5
Hex -> Binary: (Equivalent 4-bit)
Code: When numbers, letters, or words are represented by a special group of symbols, we say
that they are being encoded, and the group of symbols is called a code.
Straight Binary Coding: When a decimal number is represented by its equivalent binary
number, we call it straight binary coding.
BCD (Binary Coded Decimal): If each digit of a decimal number is represented by its binary
equivalent, the result is a code called binary-coded-decimal or BCD.
6
Forbidden Group:
Equivalent BCD for 10-16 are called forbidden group and regarded as error when
occurred.
BCD VS Binary:
7
Gray Code: Gray code has been developed as a way to represent a sequence of numbers. The
unique aspect of the Gray code is that only one bit ever changes between two successive
numbers in the sequence.
8
Bytes: A byte is a group of 8-bits.
Words: A word is a group of bits that represents certain unit of information. The word size can
be defined as the number of bits in the binary word that a digital system operates on. This PC
has a word size of 64-bits.
9
ASCII Code (American Standard Code for Information Interchange): The ASCII code is a 7-bit
code, and so it has 27 = 128 possible code groups.
Parity Bit: A parity bit is an extra bit that is attached to a code group that is being transferred
from one location to another for the sole purpose of detecting error in the code. The parity bit
is made either 0 or 1, depending on the number of 1s that are contained in the code group.
10
Chapter 3
Boolean algebra: Boolean algebra is a division of mathematics that deals with operations on
logical values or truth values true (1) and false (0).
AND OR NOT
x+0=x x.1=x 𝑥=x
x+1=1 x. 0 = 0
x+x=x x.x = x
x+𝒙=1 x. 𝒙 = 0
Multivariable Theorems:
Proof:
x + 𝑥y 𝑥 + xy
= x.1 + 𝑥y = 𝑥.1 + xy
= x(1 + y) + 𝑥y = 𝑥(1 + y) + xy
= x + xy + 𝑥y = 𝑥 + 𝑥y + xy
= x + y(x + 𝑥) = x + y = 𝑥 + y(𝑥 + x) = 𝑥 + y
11
Demorgan’s Theorem:
Truth Table: A truth table is a means for describing how a logic circuit’s output depends on the
logic levels present at the circuit’s inputs.
Basic Gates:
AND
Performs OR operation (Combination) NOT operation (Inversion)
operation(Multiplication)
Describing Logic Circuits Algebraically: Any circuit can be described using the 3-basic Boolean
operations (AND, OR and NOR).
12
Evaluating Logic Circuit Outputs: For the case (A=0, B=1, C=1, D=1)
Expression x=𝐴+𝐵 x = 𝐴. 𝐵
13
Universality of NAND:
Universality of NOR:
14
Chapter 4
Products of Sum:
Algebraic Simplification:
1. The original expression is put into SOP form by repeated application of DeMorgan’s
theorems and multiplication of terms.
2. Once the original expression is in SOP form, the product terms are checked for common
factors, and factoring is performed wherever possible. The factoring should result in the
elimination of one or more terms.
15
Designing Combinational Logic Circuits:
16
Complete Design Procedure:
1. Interpret the problem and set up a truth table to describe its operation.
2. Write the AND (product) term for each case where the output is 1.
3. Write the sum-of-products (SOP) expression for the output.
4. Simplify the output expression if possible.
5. Implement the circuit for the final, simplified expression.
Karnaugh Map Method: The Karnaugh map (K map) is a graphical tool used to simplify a logic
equation or to convert a truth table to its corresponding logic circuit in a simple, orderly
process. Its practical usefulness is limited to 5 or 6 variables.
17
Looping: The process of combining the 1s in the K-map is called looping.
18
Looping Groups of Eight (Octets):
19
Pair Looping Quad Looping Octet Looping
Ex-OR Ex-NOR
Input
Only two inputs Only two inputs
number
Output x = 𝐴B + A𝐵 x = AB + 𝐴𝐵
Output
x=AB x=𝐴𝐵
(shorthand)
Symbol
Parity Generator:
20
Parity Checker:
21
Chapter 5
Flip-Flop: A flip-flop or latch is a circuit that stores a single bit and has two stable states 1 and 0.
NAND Latch:
22
Setting Latch:
For (a) where Q=0 & 𝑄=1, when SET=0 -> Q becomes 1 and forces 𝑄 to become 0.
For (b) where Q=1 & 𝑄=0, when SET=0 -> Q stays 1 and forces 𝑄 to stay 0.
Hence, only changing SET to low makes/keeps Q HIGH and it stays like this for the whole
clock pulse.
Re-setting Latch:
For (a) where Q=1 & 𝑄=0, when SET=0 -> Q stays 0 and keeps 𝑄 at 0.
For (b) where Q=0 & 𝑄=1, when SET=0 -> 𝑄 becomes 1 and forces Q to become 0.
Hence, only changing RESET to low makes/keeps Q LOW and it stays like this for the
whole clock pulse.
23
NOR Latch:
Digital Pulses: In a digital system, when a signal switches from inactive state to active state, it
creates an effect in the circuit. Then the signal return to its inactive state but the effect remains
in the system. These signals are called pulses.
24
Asynchronous vs Synchronous:
Asynchronous Synchronous
Depends both on input change and clock
Output change Depends only on input change
pulse
Design Difficult to design Easier to design
Troubleshoot Difficult to troubleshoot Easier to troubleshoot
Clocked Flip-Flops: A flip-flop circuit that is set and reset at specific times by adding clock pulses
to the input so that the circuit is triggered only if both the clock pulse and inputs trigger and
clock pulses are present simultaneously.
Edge-triggered Level-triggered
25
Setup and Hold Times:
The setup time, tS, is the time interval before the active transition where the control
input (data) must be held.
The hold time, tH, is the time interval after the active transition where the control input
(data) must be held.
The control inputs must be stable (unchanging) for at least a time interval equal to
tS(min) before the clock transition, and for at least a time interval equal to tH(min) after
the clock transition.
26
Clocked S-R Flip-Flop: Works as an S-R flip-flop only when the clock pulse is triggered. The
following clocked S-R flip-flop works on PGT and uses the NOR latch:
Internal Circuitry of Edge-triggered S-R Flip-Flop: The circuit contains three sections:
27
Edge-detector circuit:
Clocked J-K Flip-Flop: The J and K inputs control the state of the FF in the same ways as S and R
inputs do for the clocked S-R flip-flop except for one major difference: the J=K=1 condition
doesn’t result in an ambiguous output. It generates a different state called toggle, in which the
FF changes state for each PGT/NGT of the clock. The following clocked J-K flip-flop works in PGT
and uses the NOR latch:
28
Internal Circuitry of the Edge-Triggered Flip-Flop: The circuit contains three sections:
29
Clocked D Flip-Flop:
Implementation of D Flip-Flop:
30
Chapter 7
Asynchronous (Ripple) Counter:
J=K=1 for all the FFs, meaning they’re all in toggle mode.
Clock pulses are applied only to CLK of flip-flop A.
A acts as CLK for B, B for C and C for D.
A toggles after 1 clock cycle, B after 2 clock cycle, C after 4 clock cycle and D after 8 clock
cycle.
D, C, B and A represent a 4-bit binary number, with D as the MSB.
Counting starts from 0000 to 1111 for the 15 clock cycle.
After 15 clock cycle, the counter returns to 0000 state, thus going through a complete
cycle.
It’s called asynchronous counter as the FFs don’t change in exact synchronism with the
clock pulse.
It’s called rippling counter as the FFs respond one after another like a rippling effect.
There is a propagation delay between the successive FFs.
31
MOD Number: Number of states a counter goes through before it recycles back to its starting
state. For N number of FFs,
MOD number = 2N
Frequency Division:
Each FF provides an output waveform that is exactly half the frequency of the waveform
at its CLK input.
𝐹𝑟𝑒𝑞𝑢𝑛𝑐𝑦 𝑜𝑓 𝑡ℎ𝑒 𝑖𝑛𝑝𝑢𝑡 𝑐𝑙𝑜𝑐𝑘
Frequency of the last 𝐹𝐹 = .
𝑀𝑂𝐷 𝑛𝑢𝑚𝑏𝑒𝑟
All the FFs are triggered simultaneously by CLK, the clock input pulses.
Only flip-flop A, the LSB, has permanent J and K as HIGH.
Each FF should have its J and K inputs connected, so that they are HIGH only when the
outputs of all lower-order FFs are in the HIGH state.
This counter needs more circuitry.
32
Synchronous Counter vs Asynchronous Counter:
Other names Also called Parallel counter Also called Serial/Ripple Counter
Input frequency Can operate at higher input frequency Not useful at high input frequency
33
Decoding Counters:
34