Electronics Notes (Digital)
Electronics Notes (Digital)
Pull-Up switch:
Advantages/Disadvantages of using
Digital systems over Analogue systems
Advantages:
- Less affected by electrical
interference (due to fairly large
difference between voltage levels),
can tell Logic 1 apart from Logic 0
as long as it is not too badly
distorted
- Signals can be restored to original
condition via repeaters (can travel
over long distances and is more
reliable)
- Easier to design due to only
having 2 voltage levels
- Easier to store information (as it is
stored as a series of 0s and 1s)
- Large number of digital
components can be squeezed into
small area of semiconductor
material (save costs)
Disadvantages:
- Additional steps are needed to
convert between Analogue and
Digital signals (many quantities in
our daily lives such as temperature
and light intensity are analogue
quantities)
4 0100
98 1001 1000
Truth Table 1 0
A way to show the outputs of a Logic gate
for all possible input combinations
(Input combinations are arranged in
binary from smallest to biggest)
NOT Gate
Boolean Expression: 𝑋 = 𝐴
(Inverts the Input)
Truth Table
A X
0 1
1 0
AND Gate
Boolean Expression: 𝑋 = 𝐴 · 𝐵
(Produces a Logic 1 output only if both
inputs are Logic 1)
Truth Table
A B X
0 0 0
0 1 0
1 0 0
1 1 1
OR Gate
Boolean Expression: 𝑋 = 𝐴 + 𝐵
(Produces a Logic 1 output when either
or both inputs are Logic 1)
Truth Table
A B X
0 0 0
0 1 1
1 0 1
1 1 1
0 0 1
0 1 1
1 0 1
1 1 0
0 0 1
0 1 0
1 0 0
1 1 0
1 0 0 0
Boolean Expression
To express the outputs of an Truth Table 1 0 1 0
(sum-of-product expression) (SOP)
· - Product (multiply) 1 1 0 1
+ - Sum (add up)
1 1 1 1
𝑋 - Inverse
SOP expression:
𝑋 =𝐴·𝐵· 𝐶 +𝐴· 𝐵 · 𝐶
+ 𝐴 · 𝐵 ·𝐶+ 𝐴 · 𝐵 · 𝐶
One Variable:
Law Explanation
(Same answer as K-Map)
𝐴= 𝐴 If 𝐴 = 0, 0 = 1 = 0
and vice versa
𝐴+0 =𝐴 Adding a 0
𝐴+𝐴 =𝐴 If A = 1, result is 1
If A = 0, result is 0
𝐴 +𝐴= 1 Either 𝐴 or 𝐴 = 1
𝐴·0 =0 Multiply by 0
𝐴·1 =𝐴 Multiply by 1
𝐴·𝐴 =𝐴 If A = 1, result is 1
If A = 0, result is 0
𝐴+𝐵 =𝐵 + 𝐴 OR commutative
law
𝐴 + (𝐵 + 𝐶) OR associative law
= (𝐴 + 𝐵) + 𝐶
𝐴 · (𝐵 · 𝐶) AND associative
= (𝐴 · 𝐵) · 𝐶 law
𝐴 · (𝐵 + 𝐶) Distributive Laws
= 𝐴· 𝐵+ 𝐴 · 𝐶
(𝐴 + 𝐵) · (𝐶 + 𝐷)
= 𝐴· 𝐶+ 𝐴 · 𝐷
+ 𝐵· 𝐶+ 𝐵 · 𝐷
𝐴 +𝐴· 𝐵
= 𝐴+ 𝐵
𝐴 · (𝐴 + 𝐵)
= 𝐴· 𝐵
𝐴 · 𝐵=𝐴+𝐵 De Morgan’s
𝐴 + 𝐵=𝐴·𝐵 Theorem just do K-Map its easier trust
me
Truth Table
S R Q 𝑄
0 0 No change
0 1 0 1
1 0 1 0
1 1 Invalid
Condition 1:
When S = 1 and R = 0, the latch is set
Outputs Q = 1, 𝑄 = 0
(When S = 1, Q = 0, and when Q and R =
0, 𝑄 = 0)
Condition 2:
When S = 0 and R = 1, the latch is reset
Outputs Q = 0, 𝑄 = 1
(When R = 1, 𝑄 = 0, and when 𝑄 and S =
0, Q = 1)
Condition 3
When S and R = 0, the latch remains at
the same logic state it was before it
entered this condition
(When Q = 1 and 𝑄 = 0, or Q = 0 and
𝑄 = 0, since S and R = 0, they remain the
same)
Condition 4
When S and R = 1, Q and 𝑄 = 0
(As an input of 1 into a NOR gate will
result in 0, both NOR gates produce an
output of 0 since S and R = 1, hence this
state is invalid)
Timing Diagram
Used to show how the output of a digital
system changes with time
At 𝑡0, S = 1 and R = 0, Q = 1
(Condition 1)
How it works:
- When the switch is at B, S is pulled
down to Logic 0 while R is pulled
down to Logic 1. Q = 0
- When the switch is moving from B
to A, R alternates between Logic
1 and Logic 0. Q remains at 0
(As R = 0 and S = 0, there is no
change in Q)
- When the switch reaches A, S
alternates between Logic 1 and
Logic 0. Q becomes 1 (When S =
1 and R = 0, Q = 1)
Chapter 14: Voltage Comparator Application in a automatic home
Voltage lighting system
Comparators,
Timers and
Counters
2 IN+ Connect to
voltages to be
3 IN- compared
(in this example a potentiometer
4 𝑉𝐸𝐸 Connect to ground
is used producing a reference
(0V)
voltage of 1V)
5 Balance Connect together
(Pins not used) When it is dark and 𝑉1 is less
6 Balance/ than 1V, 𝑉𝑖𝑛+ > 𝑉𝑖𝑛− and 𝑉𝑜𝑢𝑡
Strobe
will be HIGH
7 Output Connect to 𝑉𝑐𝑐
When it is bright and 𝑉1 is more
using Pull-Up
resistor (10㏀) than 1V, 𝑉𝑖𝑛+ < 𝑉𝑖𝑛− and 𝑉𝑜𝑢𝑡
will be LOW
8 𝑉𝑐𝑐 Connect to positive
voltage
How to connect LM311 Voltage
Comparator IC
555 Timer IC
Configuration
Function
1. At first, switch S is open which Pin 2 Voltage
causes Pin 2 to be pulled up to 5V
1
2. As Pin 2 is more than 3 𝑉𝐶𝐶, Pin 3
(Output) is LOW. Pin 7 (Discharge) is
connected to GND which completely
discharges 𝐶1
3. When S is closed, Pin 2 is pulled Pin 6/7 Voltage
down to 0V
1
4. Since Pin 2 is less than 3 𝑉𝐶𝐶, Pin 3
goes HIGH and the timing cycle
starts. Pin 7 acts as an open circuit
5. 𝐶1 charges towards 𝑉𝐶𝐶 Pin 3 Voltage
2
6. When 𝐶1 reaches 3
𝑉𝐶𝐶, it is detected
by Pin 6 (Threshold)
7. Pin 3 goes LOW and timing cycle
stops
Pulse width of output (Time Constant)
𝑇 = 1. 1𝑅𝐶
T - Time constant in seconds (s)
R - Resistance (Ω)
C - Capacitance (F)
Configuration
16 𝑉𝑐𝑐 Connect to 5V
power source
Count sequence
How to connect (1 counter, count to 9):
Function:
- When switch 𝑆2 is pressed, the
count values for both counters is
reset and the 7-segment displays
will display 0
- When switch 𝑆1 is pressed, the
count value increases by 1, and
the 7-segment display displays 1
- When the count value is 9 and
switch 𝑆1 is pressed, the count
value is automatically reset to 0
while the count value for counter 2
increases by 1
Application: Stopwatch