Lesson Note
Lesson Note
WEEK ONE
(A) INTRODUCTION
(B) FUNDAMENTALS OF ANALOGUE AND DIGITAL ELECTRONIC TECHNIQUES
What is Electricity?:
Electricity can be defined as the form of energy associated with the presence and flow of electric
charge. Electric charges are either negative (electrons and anions) or positive (protons and cations).
Electrical charge is measured in Coulombs (C). When two electric charges are close together, they exert
a force on each other. This force may be attractive (when the charges are opposite) or repulsive (when
the charges are the same). The region in space within which an electric charge (or collection of like
electric charges) exert(s) such a force is called an electric field. Generally, high concentration of like
electrical charges establishes a strong electrical field, and vice versa. The ability/capacity of an electric
field to do work (exert a force) on an electric charge is called electric potential. It is a measure of the
strength of the electric field. Electric potential is most often represented using the letter V and is
measured in Volts (V).
Materials that allow the flow of electric charges through them are called electrical conductors. They
are analogous to large bore pipes which allow easy flow of water (or some other fluid) through them.
Metals like copper, iron and aluminium are typically good electrical conductors. This is because they
typically have highly mobile electrons (negative electrical charges) in their physical (molecular)
structures i.e. their electrons are loosely bound to their molecules. Conversely, materials that do not
allow the flow of electric charges through them are called electrical insulators. These materials
normally have very poor electron mobility within their molecular structures. Their electrons are tightly
bound to their molecules. Typical examples of insulators are non-metals like wood and plastic.
Semi-Conductors:
Some materials may behave as conductors (though not very good ones) in certain situations and
insulators in others. Such materials are called semi-conductors. They are very important in electronics
as they are used to manufacture most modern day electronic components. Examples include silicon
and germanium.
Flow of Electricity:
When an overhead water tank is filled with water and the discharge valve is turned open, water flows
through the discharge pipe at a rate depends on the bore size of the discharge pipe, as well as the
difference in height between the tank and the discharge head of the pipe. (Demonstrate with diagram).
Similarly, when a discharge pipe is connected to the outlet of a water pump whose inlet is collected
through another pipe to a river, water flows through the discharge pipe at a rate proportional to both
bore size of the discharge pipe and the outlet pressure of the pump. (Demonstrate with diagram). Flow
1
of electric charge through a conductor is analogous to the two scenarios described above. When the
electric potentials at the two extremities of a conductor are unequal (potential difference), electric
charge flows one end (higher potential) to the other (lower potential).This is analogous to the case of a
water tank described above. When this potential difference results from connecting the terminals of a
battery (or some other electrical generator) to the two ends of the conductor, electric charge also
flows. This is analogous to the case of a water pump described above. The electric potential difference
(more commonly called voltage) in this case is called an electromotive force (e.m.f). The rate of flow of
electric charges in either case is called electric current. Current is often represented with the letter I
and is measured in Amperes (A) which is equivalent to Coulombs per Second (C/s or Cs-1).
The electrical quantities described so far (current and voltage) have the characteristic that their values
are normally constant. In a situation where the values change, the changes are non-periodical (not
oscillatory). They are referred to as D.C. Current and D.C. Voltage. D.C. stands for Direct Current.
Conversely if the values of these quantities vary periodically, they are referred to as A.C. Current and
A.C. Voltage. A.C. stands for Alternating Current. In A.C the direction of flow of electrons (and protons)
reverses every half-period.
A resistor is an electronic component which does not allow free flow of electricity through it. In order
words, a resistor is an electronic device (component) that ‘resists’ the flow of electricity through it. The
ability of a resistor to impede flow of electric currents through it is known its resistance. Resistance is
often represented with the letter R and is measured in Ohms (Ω). It should be noted that resistors are
conductors. In fact, every conductor has some electrical resistance which increases with its length and
reduces as its cross-sectional area increases. (Demonstrate using a diagram). However, the resistance
of good conductors is so small that in many practical applications it may be ignored (treated as
negligible).
(Draw the common symbols used to represent resistors in electronic circuit diagrams)
2
Capacitors and Capacitance:
A capacitor (sometimes called condenser) is an electronic component which stores energy in an electric
field. It is constructed by sandwiching an insulator between two conducting plates or foils. The
capacitance of a capacitor is a measure of its ability to store charge in its electrical field. It is measured
in Farads (F). It is most often represented with the letter C. However, 1F is such a large unit that most
practical capacitors have capacitances measured in microfarads (µF) or picofarads (pF).
(Draw the common symbols used to represent capacitors in electronic circuit diagrams)
An inductor is an electronic component which stores energy in a magnetic field. It is often constructed
by winding a conductor (wire) around a core. The ability of an inductor to store energy in is magnetic
field is known as its Inductance. Inductance is often represented using the letter L and is measured in
Henrys (H).
(Draw the common symbols used to represent inductors in electronic circuit diagrams)
Please note that resistors, capacitors and inductors are passive components.
Complex Numbers:
The concept of complex is very useful in the analysis of a number of problems and scenarios in
electronics especially those involving A.C. signals and transient (as at against steady state) conditions in
D.C. circuits. To understand complex numbers, it is important to be familiar with square roots.
The square root of any number is the number (positive or negative) which when multiplied by itself
gives the original number. Mathematically
It is important to note that for the condition in equation (1) to hold, y must be a positive number. That
is, y cannot be a negative number.
The case of a negative value y with a magnitude of one (i.e y = -1) leads to a value that cannot exist
naturally (an unreal number). This is called an imaginary number and is denoted often by the letter i or
j. Mathematically, this is stated as:
Imaginary numbers of magnitude greater than one are denoted by multiplying their magnitudes with j.
For example, the number Z j is an imaginary number with magnitude Z. Mathematically,
Zj=√−Z … … … … … … … … … (3)
A complex number, is a number made up of a real part (which is like the numbers we have all been
used to until now) and an imaginary (which is like the imaginary numbers we have just discussed).
Mathematically, a number, X, is said to be complex if it is of the form:
3
X =A + jB∨Y =C− jD … … … … … … … … (4 )
In the examples given in equation (4) above, A and C are the real parts while jC and jD are the
imaginary parts.
To add (or subtract) two complex numbers, simply add (or subtract) the real parts to get the real part
of the sum and add (or subtract) the imaginary parts to get the imaginary part of the difference.
For example, given the two complex numbers X and Y in equation (4) above, there sum and difference
is given as:
And
The multiplication or division of two complex numbers is a little more complicated than their addition
or subtraction. It involves taking into account not only the magnitudes but also the phase difference
between their real and complex parts. However, it is beyond our scope in this course and will not be
treated in any further detail. It is just important to note that the product of two imaginary numbers is
equal to minus the product of their magnitudes (this follows from the definition of imaginary numbers).
Mathematically,
And
3 2
j = j ∗ j=− j… … … … … … … … … …(8)
Hence,
2
jA∗ jB=A∗B∗j =− AB … … … … … … (9)
And
3
jA∗ jB∗jC =A∗B∗C∗j =− jABC … … … … … … … … …(10)
Electrical Conductance:
Conductance is simply the inverse of resistance. While resistance is a measure of the ability of a
component to impede the flow of current through it, conductance is a measure of the ability of the
component to allow current to flow through it. It is denoted using the symbol G and is measured in
siemens. However, it is measure more commonly using the unit mho which is an inversion of ‘ohm’.
4
Mathematically
1
G= … … … … … … …(13)
R
Conductance is important in that certain electronic components are simplified by working using
conductance instead of resistance. This we will demonstrate when we treat Ohm’s and Kirchhoff’s laws.
Recall that resistance had earlier been defined as the ability of an electrical/electronic component to
impede the flow of electric current through it. This refers to steady state D.C conditions. In transient
conditions (and in A.C circuits, especially with capacitive and inductive loads) it is more appropriate to
use the terms reactance and impedance. Reactance (capacitive or Inductive) refers to the capacity of a
capacitor or inductor to impede the flow of ‘imaginary’ (as in imaginary number that we had talked
about earlier) electric currents through it. It is denoted using the symbol X and is measured in ohms
(Ω).
1
X c= … … … … … … … … … …(14) Where C is the capacitance of the capacitor.
2 πfC
Note that in equations (14) and (15) above, f is the frequency of the electronic signal flowing through
the reactive component(s).
Impedance is a complex value comprising resistance and reactance. It is denoted using the symbol Z
and is also measured in Ohms (Ω).
Z=R+ jX … … … … … … … … … … (15)
Simply put, susceptance is the inverse of reactance while admittance is the inverse of impedance.
Susceptance is represented using the symbol B while admittance is represented using the symbol Y. In
other words, admittance is the vector sum of conductance and susceptance with conductance as the
real part and susceptance as the imaginary part. Just like conductance, they are both measured in
siemens or mho.
1
B= … … … … … … …(16)
X
5
1 1
Y= = =G+ jB … … … … … …(17)
Z R+ jX
Electrical energy is the energy carried by electrons moving in an electrical conductor under the
influence of a potential difference. It is a measure of the ability of an electrical source (like a battery to
do work). This energy may be stored temporarily in the electric field of a capacitor or in the magnetic
field of an inductor. It is represented using the letter E and is measured in Joules (J).
Electrical power, on its part, is the rate at which an electrical source can deliver energy. It is also the
rate at which electrical energy is expended or work is done by/in an electrical/electronic device, circuit
or system. It is represented using the letter P and is measured in Watts (W).
Electrical Energy (or power) may be real or ‘imaginary’. Real energy is the energy which in a resistor
manifests as heat. Real power is the power we had described above as being measured in Watts. The
part of the electrical power in an electronic circuit which cannot manifest as heat in a resistor is called
reactive (imaginary) power. It is represented using the letter Q and is measured in Volt-Amperes
Reactive (Vars). The algebraic sum of the real and the reactive powers in an electronic system is called
apparent power. It is represented using the symbol S and is measured in Volt-Amperes (VA). The
apparent power of an electrical/electronic system is the power value that will be arrived at by just
considering the voltage and current inputs to the system. All of it is not used in doing ‘real’ work. E.g.
the power rating of a stand-by electrical generator. The fraction of the apparent power which does real
work (the real power) is determined by the power factor of the system. That is, power factor is the
ration between the real and apparent power of an electrical/electronic system. It is a measure of the
efficiency of the system. The higher the power factor, the highest the system efficiency. Low power
factor implies that some of the energy supplied by the source gets stored in the load and is not used to
do ‘useful’ work. This extra energy gets to circulate back to the source and has to be dissipated
(wasted) in the source. This creates inefficiency and can cause problems due to heating of the source.
Mathematically:
S=P+ jQ … … … … … … … …(11)
And
|P|
pf = … … … … … … …(12)
|S|
In systems with purely resistive loads, the current and voltage are in phase. All the power is real (i.e
there is no reactive power and therefore the real and apparent powers are equal). The power factor is
therefore unity (one). In systems with reactive (capacitive or inductive loads) the current and voltage
are not in phase (there is phase difference between them). One leads the other. For capacitive loads,
the current leads the voltage while for inductive loads the current lags behind the voltage (i.e the
voltage leads the current). The power factors for such systems are therefore said to be leading (for
capacitive loads) or lagging (for inductive loads). In purely capacitive (or inductive) loads, there is no
real power (i.e. all the power is reactive). The power factor is therefore zero (0). The phase difference
between the current and voltage for such loads is 90 0, with current leading in purely capacitive loads
6
and lagging in purely inductive load. Purely capacitive circuits ‘supply’ reactive power while purely
inductive circuits ‘absorb’ reactive power. The power factor may (in certain cases especially where the
signals are purely sinusoidal) be approximated as the cosine of the phase angle between the current
and the voltage.
Assignment: (1) What is the meaning of the following pre-fixes: femto, pico, nano, micro, milli, Kilo,
Mega and Giga. (2) Describe in detail the behaviour of a resistors, capacitors and inductors
respectively when a potential is applied across them. (3) Differentiate between the terms apparent
power, real power, reactive power and power factor; and relate them to your personal experiences.
WEEK TWO
Ohm’s Law:
Ohm’s law states that the current flowing through a conductor is directly proportional to the potential
difference applied between its two ends provided all other conditions are constant.
I ∝ V … … … … … … … …(13)
I =kV … … … … … … … …(14)
This constant k has the same dimensions as electrical conductance. We can thus replace it with G
which is theelectrical conductance of the current carrying conductor in question to give:
I =GV … … … … … … … …(15)
1
Recall that from equation (13) above G= . Substituting this in equation (15) gives:
R
V
I= … … … … … … …(16)
R
V =IR … … … … … … … … (17)
Equation (17) is the most common form of mathematical expression of the ohm’s law.
For purely reactive circuits, the ohm’s law is written mathematically as:
V =IX … … … … … … … …(18)
7
And for complex impedances, it is written as:
V =IZ … … … … … … … …(19)
(Draw sample resistive and reactive circuits and guide the students in evaluating the circuit
parameters using the ohm’s law)
Kirchhoff’s current law states that the algebraic sum of currents flowing into a node (junction) in an
electrical/electronic circuit is zero (0). In order words, the sum of currents flowing into a junction
equals the sum of currents flowing out of the junction. Please note that this law holds only if the total
electric charge, Q, in the region being considered remains constant.
∑ I x =0 … … … … … … … … … … … …(20)
x=1
(Draw sample circuits and guide students in solving for various currents in the circuits by
applying a combination of ohm’s law and KCL)
Kirchhoff’s voltage law states that the algebraic sum of potential drops in a closed loop of an
electrical/electronic circuit is zero (0). In order words, the sum of voltage drops in a closed loop equals
the sum of voltage rises in the loop. This assumes that there is no fluctuating magnetic field linking the
loop. A closed loop is a complete loop in a circuit which does not enclose another.
∑ V x =0 … … … … … … … … … … … …( 21)
x=1
(Draw sample circuits and guide students in solving for various currents in the circuits by
applying a combination of ohm’s law and KVL)
The equivalent resistance of two or more connected resistors is the resistance of a single resistor which
can be used to replace them in the circuit without any (significant) change in the circuit characteristics.
For resistors in series, the equivalent resistance equals the sum of their individual resistances.
Mathematically:
8
(Draw sample series resistive circuits and have students calculate the equivalent resistances)
For resistors in parallel, the inverse of the equivalent resistance equals the sum of the inverses of their
individual resistances
Mathematically:
1 1 1 1 1
= + + +…+ … … … … … … … … … (23)
R eq . R1 R 2 R 3 Rn
1
Considering that G= as given in equation (13) above, equation (23) may be rewritten as:
R
(Draw sample parallel resistive circuits and have students calculate the equivalent
resistances using both equation (23) and equation (24))
Please note that the form given in equation (24) might make for easier calculation of the equivalent
resistance.
The equivalent capacitance of two or more connected capacitors is the capacitance of a single capacitor
which can be used to replace them in the circuit without any (significant) change in the circuit
characteristics.
For capacitors in series, the inverse of the equivalent capacitance equals the sum of the inverses of
their individual capacitances
Mathematically:
1 1 1 1 1
= + + +…+ … … … … … … … … … (25)
Ceq . C1 C 2 C3 Cn
(Draw sample series capacitive circuits and have students calculate the equivalent
capacitances)
For capacitors in parallel, the equivalent capacitance equals the sum of their individual
capacitances.
Mathematically:
(Draw sample parallel capacitive circuits and have students calculate the equivalent
capacitances)
9
Equivalent Inductance of Inductors in Series and Parallel:
The equivalent inductance of two or more connected inductors is the inductance of a single inductor
which can be used to replace them in the circuit without any (significant) change in the circuit
characteristics.
For inductors in series, the equivalent inductance equals the sum of their individual inductances.
Mathematically:
(Draw sample series resistive circuits and have students calculate the equivalent resistances)
For inductors in parallel, the inverse of the equivalent inductance equals the sum of the inverses of
their individual inductances
Mathematically:
1 1 1 1 1
= + + +…+ … … … … … … … … …(23)
Leq. L1 L2 L3 Ln
(Draw sample parallel inductive circuits and have students calculate the equivalent
inductances)
Assignment
(b)
10
(c)
(d)
(b)
11
(c)
(d)
12
3. Calculate the equivalent capacitances of the following
(a)
(b)
(c)
(d)
13
Open and Short Circuits:
An open circuit is a circuit which does not have a through path for current to flow. It is said to have
infinite resistance. Hence, no current can flow in an open circuit. Also, the maximum applied voltage
appears across the open circuit.
Mathematically:
Ropen−circuit =∞ … … … … … … … … … … …(24)
A short circuit on the other hand is one in which there is no resistance to current flow. There is no
voltage drop across a short circuit. Therefore, infinite current flow in a short circuit condition.
Mathematically:
R short−circuit =0 … … … … … … … … … … …(24)
WEEK THREE
A good number of electronic components and devices today are fabricated using semi-conductor
technology. Diodes, transistors, and integrated circuits including microprocessors are all manufactured
using semi-conductor technology.
A semi-conductor is a material which is neither a good conductor nor a good insulator of electricity.
They are usually inorganic crystalline solids. Semi-conductors typically have 4 valence electrons.
Therefore, it takes as much energy for then to donate electrons to other atoms as it takes for them to
accept from other atoms. Hence, their being neither good conductor nor good insulators. Elemental
semi-conductors like silicon (Si) and germanium (Ge) are of the group IV in the periodic table. However
some compounds like Gallium-Arsenide (GaAs) and Aluminium-Gallium-Arsenide (AlGaAs) have some
advantages over elemental semi-conductors and are more suitable for some applications like high
speed lasers.
Doping:
A semi-conductor in a pure state is referred to as an intrinsic semiconductor. In its intrinsic state, the
semi-conductor is not of much use in electronics. However, when a little impurity is introduced in the
semiconductor material by interspacing impurity atoms (of group III or group V) elements among the
silicon atoms, the semi-conductor materials develops interesting electronic properties and is referred
to as extrinsic semiconductor. This process is called doping. The impurity materials used for doping are
14
called dopants. When a semi-conductor is doped with such high level of impurities that it behaves
more like a conductor, it is referred to as degenerate.
When the dopant is a group III element like Boron (B) and Aluminium (Al), it combines with the semi-
conductor to form a bond with 7 valence electrons. This can easily accept one electron and so has an
affinity for electrons. It is therefore taken to be positively charged. Such an extrinsic semi-conductor is
referred to as a P-type semi-conductor.
Courtesy: http://www.ee.sc.edu/personal/faculty/simin/ELCT566/03%20Semiconductors%20II-Doped,%20transport.pdf
On the other hand, when the dopant is a Group V element like Phosphorous (P) and Arsenic (As), it
combined with the semi-conductor to form a bond with 1 valence electron. This can easily donate one
electron and is regarded as negatively charged. Such an extrinsic semi-conductor is referred to as an N-
type semi-conductor.
Courtesy: http://www.ee.sc.edu/personal/faculty/simin/ELCT566/03%20Semiconductors%20II-Doped,%20transport.pdf
15
In order to make electronic devices like the diode and the transistor, a P-type semi-conductor is
bonded with (actually grown alongside) an N-type semi-conductor in the same crystal. The joint
between the two (P-type and N-type) extrinsic semiconductors is called a P-N junction.
P N
At the P-N junction, electrons (negative charge carriers) from the N-type semi-conductor combine with
holes (positive charge carriers) from the P-type. The region immediately at the P-N junction is therefore
neutral and serves as a barrier to flow of current through the semi-conductor, from the P region to the
N region and vice-versa. This region is referred to as the depletion region.
When a potential difference is applied across a P-N junction (for example by connecting the terminals
of a battery across it), it is said to be biased. If the positive terminal is connected to the P-doped region
while the negative terminal of the battery is connected to the N-doped region, charges are repelled
towards the P-N junction, thereby reducing the size of the depletion region. In this case, the P-N
junction is said to be forward biased. If the applied voltage is high enough to repel the charges across
the P-N junction, current flows.
P N
On the other hand if the negative terminal of the battery is connected to the P-doped region while the
positive terminal of the battery is connected to the N-doped region, charges are attracted to the
battery terminals, away from the P-N junction, thereby increasing the sixe of the depletion region. This
makes it even more difficult for current to flow across the P-N junction. The junction is therefore said to
be reverse biased.
P N
16
Semi-Conductor Diodes, their Characteristics and Uses:
A semi-conductor diode is a device made from a single P-N junction. The P-doped doped region is called
the anode while the N-doped region is called the cathode. Diodes allow current flow only in one
direction (from the anode to the cathode) and this occurs when they are forward biased. When reverse
biased, a diode blocks the flow of current. They are used as rectifies in DC converters and in radio
receivers (AM radios).
Anode Cathode
(+) (-)
Courtesy: http://en.wikipedia.org/wiki/Diode
Some special diodes include the zener diode which is used for voltage regulation, the Light Emitting
Diode (LED) which is used in displays, the tunnel diode which is used as an amplifier, the varicap diode
which is used as a voltage controlled variable capacitor and the photodiode which is used to detect
light.
A transistor is made up of two P-N junctions, either by sandwiching a P-doped region between two N-
doped regions or vice versa in a semi-conductor crystal. It therefore contains two P-N junctions. If the
centre region is P-doped, the transistor is called an NPN transistor. However, if the centre region is N-
doped, the transistor is called a PNP transistor.
P N P N P N
The transistor can be regarded as two diodes connected back to back as shown in the diagram below.
Collector
Base
Emitter
Collector
17
Base
Transistors are used as amplifiers in which case a small input current/voltage is used to control a larger
input current/voltage. They are also used as solid state switches. The transistor is about the most
important component in modern electronics.
Transistor amplifiers typically have poor characteristics including low input impedance, high output
impedance and low and gain. A device which provides characteristics close to the ideal and thus makes
a better amplifier than the transistor is the operational amplifier (opamp).
The opamp is actually made using transistors, as well as other components. It has infinite input
impedance (the input draws no current), zero output impedance and infinite gain. It is has two inputs
known as the inverting and the non-inverting inputs.
Any signal fed into the inverting input is amplified and inverted at the output while any signal fed into
the non-inverting input is amplified without inversion at the output. In other words, the output of an
opamp is in phase with the non-inverting input and 1800 out of phase with the inverting input.
18
It is important to note that the opamp amplifiers the difference in the signal levels between the
inverting and non-inverting inputs and not the individual signals themselves. It is therefore called a
differential amplifier.
In nursery and primary school, we learn to count from 0 to 9 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). All other
numbers are combinations of these 10. This is because our normal, everyday number system is in base
10 (decimal number system). Other number bases include bases 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ..… 16.
Digital electronics today is based on the binary number system (base 2). In this number system only the
numbers 0 and 1 are used. The result is that representing moderate to large numerical values using this
number system consumes a lot of ‘paper’ space. Hence, the hexadecimal (base 16) and octal (base 8)
number systems are sometimes used as compressed forms of the binary. Consequently, we will
concentrate more on the binary and hexadecimal, as well as the already familiar decimal number
systems.
In digital electronics, one binary digit is referred to as one bit, four binary digits (four bits) equal one
nibble while eight binary digits equal one byte.
The table below shows decimal numbers along their binary, octal and hexadecimal equivalents. It is
important to note that 4 binary digits (a nibble) are needed to represent 1 hexadecimal digit. In the
same way, the binary equivalent of 2 hexadecimal digits is 8 bits (a byte) long.
Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16)
00 000000 000 00
01 000001 001 01
02 000010 002 02
03 000011 003 03
04 000100 004 04
05 000101 005 05
06 000110 006 06
07 000111 007 07
08 001000 010 08
09 001001 011 09
10 001010 012 0A
11 001011 013 0B
12 001100 014 0C
13 001101 015 0D
14 001110 016 0E
15 001111 017 0F
16 010000 020 10
17 010001 021 11
18 010010 022 12
19 010011 023 13
20 010100 024 14
21 010101 025 15
22 010110 026 16
23 010111 027 17
24 011000 030 18
25 011001 031 19
26 011010 032 1A
19
27 011011 033 1B
28 011100 034 1C
29 011101 035 1D
30 011110 036 1E
31 011111 037 1F
32 100000 040 20
The convention for writing a number in a particular base is to indicate the base as a subscript after the
number. For example 1010 decimal number 10 (i.e. 10 in base 10), 14 8 means octal number 14 (i.e. 14 in
base 8) while 1012 means binary number 101 (i.e. 101 in base 2). For the binary, octal, decimal and
hexadecimal number systems, the subscripts b, o, d and h may be used respectively. Since the decimal
number system is the most commonly used, it is conventional not to indicate the base using this
subscript system when working in this number system except when it is necessary to avoid ambiguity.
It is important to note that the maximum decimal value that can be expressed using a given number of
digits in another number base can be calculated using the formula:
n
dmax=x −1
Where dmax is the maximum decimal value, x is the new number base, and n is the number of
digits in the new number base.
For example, 2 bits can represent a maximum decimal value of 22−1=4−1=3 , 2 octal digits can
represent a maximum decimal value of 82 −1=64−1=63 while 2 hexadecimal digits can represent a
maximum decimal value of 162 −1=256−1=255 .
To convert a binary number to decimal, multiply each digit by its place value and add the resulting
products. The place value of a digit equals 2 raised to the power of the digits position, counting from
the rightmost digit, starting at zero.
For example, to convert 10011 b to decimal, the place value of the first digit (the rightmost) is 2 0 = 1, the
place value of the next (second) digit is 2 1 = 2, while the place value of the last digit (the leftmost) is 2 4
= 16.
¿ 16+0+ 0+2+1
¿ 19d
On the other hand, to convert a decimal number from binary, successively express
the number in terms of sums of the highest possible consecutive powers of 2.
Thereafter, indicate one at the bits whose place values are represented in the
powers of 2 and zero at all other bits.
20
5 2 0 5 4 3 2 1 0
37 d=32+ 4+1=2 + 2 +2 =1∗2 +0∗2 + 0∗2 +1∗2 +0∗2 + 1∗2
¿ 100101b
Binary and hexadecimal addition and subtraction are quite similar to decimal addition and subtraction.
The only difference is that while the values of decimal digits are in powers of 10 (millions thousands
hundreds tens and units), the values of binary digits are in powers of 2 (one-hundred-and-twenty-
eights sixty-fours thirty-twos sixteens eights fours twos and units), likewise for hexadecimal digits.
WEEK FOUR
Digital electronics is the branch of electronics that deals with digital (discrete) as against analogue
(continuous) signals. Modern day digital electronics is mostly based on binary signals. These signals
have only two possible value, 0 and 1, true and false, or on and off. Therefore, digital electronic
systems generate, manipulate/process, store, and transmit such signals.
The most basic digital electronic component is the one-way switch. Such switches are either one or off
(binary values). However, in modern binary electronics, the basic building blocks (components) are
referred to as logic gates. A logic gate is an abstraction used to represent one of the logic function
(AND, OR, NOT, XOR) and their derivatives (NAND, NOR). Physically, logic gates are implemented using
diodes, transistors and resistors. An understanding of Boolean (logic) functions and Boolean facilitates
understanding of the function of logic gates. Hence, we will review Boolean functions and algebra. A
boolean function is a function whose value, as well as the value(s) of its operand(s) can only be true or
false.
Truth Tables:
A truth table is a tabular description of a boolean function. It shows the operand(s), operator(s), as well
as result of the function for each condition. Below is shown the truth tables for the common logic
functions. Here, 0 represents off or false while 1 represents on or true. In adittion, A, B and C represent
inputs to the functions.
A B A.B A B C A.B.C
0 0 0 0 0 0 0
0 1 0 0 0 1 0
1 0 0 0 1 0 0
1 1 1 0 1 1 0
Truth table of a two input 1 0 0 0
AND function 1 0 1 0
1 1 0 0 21
1 1 1 1
Truth table of a three input AND
function
An AND function will have a TRUE value if and only if all the inputs are TRUE
An OR function will have a FALSE value if and only if all the inputs are FALSE
III) The XOR (Exclusive OR)function: This function is represented with ‘(+)’ (actually an
encircled plus sign).
A B A(+)B
0 0 0
0 1 1
1 0 1
1 1 0
Truth table of the XOR function
The XOR function will have a TRUE value if and only if the inputs have different values.
IV) The NOT function: This function is represented with a bar drawn on top of the letter.
However, we will represent it here with the symbol ! preceding the variable.
A !A
0 1
1 0
Truth table of the NOT function
The symbols of the logic gates representing the Boolean functions whose truth tables are shown in (I)
to (IV) above are shown below.
22
Input
Input
OR Gate.
Courtesy: http://commons.wikimedia.org/wiki/File:Or-
gate-en.svg
XOR Gate.
NOT Gate.
Courtesy: http://commons.wikimedia.org/wiki/File:Xor-
Courtesy:
gate-en.svg
http://www.bbc.co.uk/schools/gcsebitesize/design/electron
ics/logicrev3.shtml
The NAND and NOR gates are simply AND and OR gates respectively whose outputs are connected to
the inputs of NOT gates.
For simplicity, the NOT function can be represented using a bubble at the input or output of the AND,
OR or XOR gate where it is connected.
Boolean Algebra:
Boolean algebra is the sub-area of algebra in which the variables can have only Boolean values
(true/false, on/off, or 1/0). The main operations of Boolean algebra are the conjuction (AND), the
disjunction (OR), and the negation (NOT).
These are statements of identities between two Boolean terms. They are the rules based on which
Boolean expressions may be evaluated. These laws include the following.
1. A + (B + C) = (A + B) + C
2. A.(B.C) = (A.B).C
3. A+B=B+A
4. A.B = B.A
5. A.(B + C) = A.B + A.C
6. A + (B.C) = (A + B).(A + C)
7. A+0=A
23
8. A.0 = 0
9. A+1=1
10. A.1 = A
11. A+A=A
12. A.A = A
13. A.(A + B) = A
14. A + (A.B) = A
15. A.!A = 0
16. A + !A = 1
17. !!A = A
18. !(A + B) = !A.!B
19. !(A.B) = !A + !B
Laws (18) and (19) are called the De Morgan’s laws. The implication of these two laws in digital
electronics is that an AND gate is equivalent to (and can be replaced with) an OR gate with negated
output and inputs while an OR gate is equivalent to (and can be replaced with) and AND gate with
negated output and inputs.
WEEK FOUR
24