Introduction To Digital Electronics Merged Compressed
Introduction To Digital Electronics Merged Compressed
Introduction
- Electronics has been an important part of engineering and science world as
well as a normal human being from the mid twentieth century.
- Electronics deals with flow of current, but this current flow is due to a
controlled flow of electrons (or charge carriers, to be generic) in gas or
vacuum in early stages to solid state semiconductors in modern devices.
- In fact, the major breakthrough in the field of electronics is the use of
Semiconductor materials, which made electronic circuits and devices small,
cheap, reliable and consume very low power.
- Electronics circuits can be divided into two broad categories, digital and
analog.
- Analog electronics involves quantities with continuous values.
- Digital electronics involves quantities with discrete values (0,1). The
discrete values are achieved by using switching (transistor, diode).
Binary Digits
[0,1] are the two digits in the binary system which called bit.
0 1 0= no voltage
Low High 1= full source voltage
OFF ON 0= low voltage 1V
False True 1=high voltage 4V
1
Lecture One
2
Lecture One
3
Lecture One
Digital Waveforms
A digital waveform is made up of a series of pulses.
1 1 1
1
0100110 digital word
0 0 0 0
1
HIGH HIGH
Falling or rising or
rising or trailling edge Failling or trailing age
leadge edge leadge age
0 low
(a) Pulse-positive (b) Pulse-negative
Logic Gates
To express the logic operations of a gate the truth table lists all inputs and
outputs N=2n
4
Lecture One
n=2 N=4
n =3 N=8
n =4 N=16 and so on
5
Lecture Two
Logic Gates
Logic gates: are physical devices which perform logic operation on one or more
logical inputs, and produces a single logical output.
1- NOT –Gate
It is also known as an inverter because the output is opposite to the input. It
has one input and one output. Circuit diagram of NOT gate using transistor
is shown below:
1
Lecture Two
VCC=ICRL+VCE=ICRL+VC
X =ICRL+Y
- When X=0
- Low voltage level at the base of the transistor, the transistor will be cutoff, IC
=0 so ICRL=0 and Y=VCC=1 (high voltage level)
- When X=1
- High voltage level at the base of the transistor, the transistor will be ON, and
IC = IC (sat.) so ICRL=VCC that leaves Y a low voltage level Y=0 (low voltage
level).
2- OR-Gate
An OR-gate has two or more inputs but only one output.
2
Lecture Two
- If all inputs are in LOW, both diodes are reverse biased hence acts as an
open switch. Hence the output voltage is 0V.
- If A is HIGH and B is LOW, diode D1 becomes forward biased hence act as
the closed switch. While D2 is reverse biased so it acts as an open switch.
Hence the output is HIGH.
- Also, If A is LOW and B is HIGH. Diode D2 is forward biased and acts
as an open switch. Diode D1 is reverse biased and so it acts as an open
switch. Hence the output is HIGH.
- If both input are HIGH, the two diodes are forward biased, they act as closed
switches and so the output will be HIGH.
No. of combinations =2n,
22=4
Truth Table
A (21) B (20) Y Description
0 0 0 A and B are both open, lamp OFF
0 1 1 A is open and B is closed, lamp ON
1 0 1 A is closed and B is open, lamp ON
1 1 1 A is closed and B is closed, lamp ON
3
Lecture Two
Pulse Duration
1
4
Lecture Two
Pulsed Operation
1
0
A
B 0
C 0
Y 0
3- AND-Gate
An AND- gate has two or more inputs but only one output.
5
Lecture Two
- If A is HIGN and B is LOW, the diode D1 is reversed biased hence act as an open
switch, diode D2 is forward biased hence act as the closed switch. Hence the output
is LOW.
- If A is LOW and B is HIGH, the diode D1 is forward biased hence act as a closed
switch, diode D2 is reversed biased hence act as an open switch. The output is
LOW.
- If all inputs are 0 then both diodes are forward biased and act as closed switch.
Hence the output is LOW.
- When both inputs are HIGH then both diodes are reversed biased hence act as an
open switches. Hence the output is HIGH.
6
Lecture Two
Pulse Duration
1
7
Lecture Two
Pulse Duration
A 0
B 0
C 0
4- NOR-Gate
A NOR gate is a combination of OR gate and NOT gate, it is NOT-OR, i.e.
an OR function with an inverted output. It has two or more input signals but
only one output signal. All input must be low to get a high output.
8
Lecture Two
A B A+B
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0
5- NAND-Gate
A NAND gate is a combination of AND gate and NOT gate (NOT-AND)
i.e. an AND operation with an inverted action. It has two or more input signals
but only one output signal.
Logic operation: a low output occurs only when all inputs are high. If any of
the inputs are low, the output will be high.
9
Lecture Two
Truth table
A B A.B
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
Parity
Even parity: a logic word with an even no’s of 1’s
11, 11011,10111
Odd parity: a logic word with an odd no’s of 1’s
111, 1101
10
Lecture Two
0 1 1 0 0 1 1 odd parity
1 0 0 1 1 0 1 odd parity
1 1 0 0 0 0 0 even parity
11
Lecture Two
A B B
0 0 1 1 0 0 0 1
0 1 1 0 0 1 1 0
1 0 0 1 1 0 1 0
1 1 0 0 0 0 0 1
12
Lecture Three
1- Combinational Circuits
A combinational circuit is the digital logic circuit in which the output
depends on the combination of inputs at that point of time with total
disregard to the past state of the inputs.
Example 1: Give the logic equation for the given logic circuits and give the
truth table
Y= AB + BC
Y=A.B+B.C
A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
Lecture Three
Example 2: Give the logic equation for the given logic circuits and give the truth
table
Y= A.B+
A B C Y
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
Lecture Three
Example 3: Give the logic equation for the given logic circuits and give the truth
table
Lecture Three
2- Applications
2-1 Controlled Inverter
The input number is a binary. Its decimal equivalent is the number assigned to
the AND-Gate whose output will be 1.
All inputs for this AND gate are high so the output high
XYZ= 101 D5=ON 101=5
ABC= 100 y4= ON 100=4
Since only 1 of 5 output lines has a high voltage
Lecture Three
The odd parity generator maintains the binary data in an odd number of 1's,
for example, the data taken is in even number of 1's, this odd parity generator is
going to maintain the data as an odd number of 1's by adding the extra 1 to the
even number of 1's. So 1 is added to the real even no. to change it to odd parity.
Lecture Three
3- bit Register
Y3Y2Y1Y0 = ABCD (the output of each gate depends on the data inputs)
Lecture 5
Arithmetic Logic Circuits
1- Addition
- There are many information-processing tasks performed by the digital
computer, which include arithmetic operations.
- The most basic arithmetic operation is the addition of two binary digits.
- The simple-addition consists of four-possible elementary operations.
0+0=0
0+1=1
1+0=1
1+1=10 [0 with carry 1]
Carry
1
Lecture 5
𝐒 𝐀 𝐁
C=AB
CO = AB + B +A
2
Lecture 5
Inputs Outputs
A B C S Co
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
- When all inputs bits are 0’s, the output is 0.
- The S output is equal to 1 when only one input is equal to 1 or when all
three inputs are equal to 1.
- The CO output is equal to 1 when two inputs are equal to 1.
A
B
C
C C
3
Lecture 5
Fig. 1 a- Logic diagram of the full-adder, b- block diagram of full- adder
C3 C2 C1
A3 A2 A1 A0
B3 B2 B1 B0
C4 S3 S2 S1 S0
Ex1:
111 C
0111 A
0101 B
1100
Ex2:
C
1000 A
1000 B
10000
4
Lecture 5
2- Binary Subtraction
0-0=0
1-1=0
1-0=1
102 -1=1
- When we have 0-1 we have to borrow from the next higher column so 102
is created and the last of the four rules is applied (exactly as decimal)
Ex.
010 0110
11 11 101 1001
- 01 -10 -011 -0110
10 01 010 0011
5
Lecture 5
X Y 0-0=0
1-0=0
1-1=0
010
101
- 011
010
2-2 Full-Subtractor
The full subtractor is a combinational circuit which has three inputs and
two outputs. It performs subtraction in two bits taking account that a 1 may
have been borrowed by a lower significant stage.
Inputs Outputs
X Y Z D B
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
̅ ̅ ̅
6
Lecture 5
7
Lecture 5
Exp: using 1st complementary method subtracte 1112 from 1012, 011012
from 110112
111 01101
- 101 -11011
111 01101
+ 010 (1st complement) +00100
1001 10001 (-) no carry then
1+ recomplementry the results -01110
010 (+) endround
- When there is no last carry, the answer (-ve) and in the 2nd complement of
the actual magnitude.
8
Lecture 5
9
Lecture 5
10
Lecture 6
Till now we concern with combinational logic circuits which are composed
of a number of different logic gates. The output is based on the input variables. The
output is either expressed by a Boolean equation or truth table or both.
A Sequential circuit combinational logic circuit that consists of inputs
variable (X), logic gates (Computational circuit), and output variable (Z).
1
Lecture 6
1- RS Flip-flop
- It is simplest storage devices called reset-set (RS) flip-flop which can be
constructed by using two NAND or two NOR gate. It has two inputs, one is
called “SET” which will set the device (output =1) and is labelled S and
another is known as “RESET” which will reset the device (output = 0)
labelled as R. The RS stands for SET/RESET. In our study we will take
NOR gate as RS flip flop.
2
Lecture 6
3
Lecture 6
S R Q
0 0 Memory (as before)
0 1 0 1
1 0 1 0
1 1 NOT USED
4
Lecture 6
2- CLOCKED RS Flip-flop
-Clocked RS Flip-Flops is the addition of two AND gates at the R and S inputs and
the CLOCK (C) to control whether a flip-flop can be enabled or disabled.
5
Lecture 6
- When CLK=0: no matter what the logic level of R or S are, the output of the
AND-Gates will be 0. The inputs of the flip-flop are (0, R=0, S=0, so there will be
no change of the state of the flip-flop i.e. the flip flop store its value.
- When CLK=1: with S=1, AND-Gate 2 is enabled and its output will be 1. The S
signal has gone through the AND-Gate to SET the flip-flop. R=0, AND-Gate 1 will
be disabled and R=0 will be at the input of the flip-flop.
The same happens for the rest of the truth table.
- In summary, when CLK=1 the S and R has their effect on the flip-flop.
This is the idea of synchronizing; the flip-flop can change its state only when the
CLK=1. The appropriate timing of the CLK is chosen according to the time we
want to retain (store) a certain state of the flip-flop.
3- D flip-flop
- From RS flip flop we saw that S and R are complement to each other (S=0,
R=1 and S=1, R=0). So instead using two inputs we can use only one input
and use inverter (NOT gate) to have second input.
6
Lecture 6
- The effect is that D input condition is only copied to the output Q when the
clock input is active.
- When D=0: S=0, R=1 the flip-flop will RESET Q=0
- When D=1: S=1, R=0 the flip-flop will SET =1
- This can be seen in the truth table.
- It can be seen that Q=D
Clocked D flip-flop
- The D flip-flop has only a single data input (D) and a clock input (CLK).
- Why we use CLK? To avoid an additional inputs “ If If this data input is
HIGH f pf p u “ E ” LOW f pf p
u “RE E ” H , u
pointless since the output of the flip flop would always change on every
pulse applied to this data input”.
- As it can be seen that the truth table is valid when CLK=1. When CLK=0
both AND-Gates are disabled and D is prevented from the flip-flop.
7
Lecture 6
- In this case only when CLK=1 , D=Q and the input signal will transfer to the
output.
8
Lecture 7
1- J-K Flip-Flop
- A gated S R flip flop with the addition of a clock input circuitry is
basically the J k flip flop.
- This circuit prevents the invalid output condition which occurs when both
inputs are high. The new addition here gives us four possible outputs of
the flip flop. The output may be – No Change, Logic 0, Logic 1 &
Toggle.
Clk J K Q
0 X X Memory
1 0 0 Memory
1 0 1 0
1 1 0 1
1 1 1 Toggle ( ̅ )
1
Lecture 7
1- CLK=0, Memory
5- J and k =1 (HIGH)
It’s a problem. If we take Q=0, ̅ .And when Q=1, the output value
̅ will 0. We see that the value of the Q and ̅ will complement each
other means system is not an invalid state or not in a running state.
2
Lecture 7
3
Lecture 7
4
Lecture 7
2- Master-Slave Flip-flop
- As we can see, it consist two JK flip-flop one is called master and the other
is called slave.
Working of a master slave flip flop
1- When the clock pulse goes to 1, the slave is isolated; J and K inputs may
affect the state of the system. The slave flip-flop is isolated until the CP
goes to 0. When the CP goes back to 0, information is passed from the
master flip-flop to the slave and output is obtained.
2- Firstly the master flip flop is positive level triggered and the slave flip flop
is negative level triggered, so the master responds before the slave.
3- If J=0 and K=1, the high Q’ output of the master goes to the K input of the
slave and the clock forces the slave to reset, thus the slave copies the
master.
5
Lecture 7
4- If J=1 and K=0, the high Q output of the master goes to the J input of the
slave and the Negative transition of the clock sets the slave, copying the
master.
5- J=1 and K=1, it toggles on the positive transition of the clock and thus the
slave toggles on the negative transition of the clock.
6- If J=0 and K=0, the flip flop is disabled and Q remains unchanged.
6
Chapter Four Field Effect Transistors
The Field Effect Transistor, FET, is a three terminal active device that uses
an electric field to control the current flow and it has high input impedance which
is useful in many circuits. It is a key electronic component using within many areas
of the electronics industry.
There are two types of FET: Junction FET (JFET) and metal oxide semiconductors
(MOSFET)or insulated gate FET.
1
Chapter Four Field Effect Transistors
2
Chapter Four Field Effect Transistors
Operation
Figure below shows the normal polarities for biasing an N-channel JFET.
The idea is to apply a negative voltage between the gate and the source.
Since the gate is reversed-biased, only a very small reverse current flows
in the gate Ig=0.
The name field effect is related to the depletion layers around each PN
junction. Free electrons moving between the source and the drain must
flow through the narrow channel between depletion layers. The size of
these depletion layers determines the width of the conductive channel.
The more negative the gate voltage the narrow the conductive channel
becomes, i.e. the conductivity is reduced, because the depletion layers
get closer to each other. Therefore, the gate voltage controls the current
that flows between the source and drain. The more negative the gate
voltage, the smaller the current.
3
Chapter Four Field Effect Transistors
Fig. above shows the symbol and circuit for n- and p-channel JFET. For n-channel
JFET, ID and VDS are positive and VGS is negative.
c) JFET Characteristics
The curves plotted between the current value at the drain and the voltage
applied in between drain and the source for different values of the gate-source
voltage are the output characteristic curve that are also referred to as the drain
characteristics.
1. Ohmic Region: When small values of VGS the depletion layer of the
channel is very small and the JFET acts like a voltage controlled resistor. It
is also known as the linear region.
4
Chapter Four Field Effect Transistors
NOTES
Cut-off Region: This is also known as the pinch-off region were the Gate
voltage, VGS is sufficiently negative so as to cause the channel to close
making the drain current equal to zero. As the drain voltage is increased
the channel tends to become narrower and narrower and current at the
drain terminal gets smaller. At a particular drain to source voltage called
the pinch-off voltage the drain current reaches the saturation level. [Cut
off region is due to VGS but the pinch off voltage is due to VDS].
Pinch –off voltage Vp: is the drain voltage above which the drain current
become almost constant for shorted gate condition. When the drain voltage
equals Vp, the conducting channel becomes extremely narrow and the
depletion layers almost touch, further increase in drain voltage produce
only the slightest increase in drain current.
Now if a negative voltage is applied to the gate terminal then, in that case,
the channel present at the gate reverse biases and the saturation current
starts decreasing further. At a particular gate voltage the device stops
conduction this is called the cut-off-voltage.
5
Chapter Four Field Effect Transistors
When VGS= VGS(off) the depletion layers touch, cutting off the drain current.
Since Vp is the drain voltage that pinches off current for the shorted-gate
condition. Vp=- VGS(off)
Tranconductance
6
Chapter Four Field Effect Transistors
gm = -
d) JFET Biasing
1- Self-Bias
The idea is to use the voltage across the source resistor Rs to produce the gate-
source reverse voltage.
From the above fig., since VGS is reverse voltage negligible Ig
flows through RG. Therefore, the gate voltage with respect to
ground is zero:
VG =0
Vs=IdRs
VGS=VG-VS=-IdRs, VG =0
Rs make a reverse bias between the gate and the source and maintain the
value of Id constant.
7
Chapter Four Field Effect Transistors
8
Chapter Four Field Effect Transistors
Negative V GS
positive V GS
a/ IGFET region
9
Chapter Four Field Effect Transistors
1- Depletion Mode:
This happens when negative voltage is applied on the gate .the operation
here is similar to that of the JFET.
10
Chapter Four Field Effect Transistors
the more (-Ve) gate voltage is, the smaller the current through the channel.
Enough negative voltage on the gate (VGS(off)) cuts off the current between the
source and the drain. Therefore, with (-Ve) gate voltage the action of a
MOSFET is similar to that of a JFET.
2) Enhancement mode
In this mode the gate is made positive with respect to the source. The input
gate capacitor is able to create free electrons in the channel which increasing Id.
this positive voltage will attracts the electrons into the channel opposite to the gate
thus increasing the conductivity of the channel. A increasing the positive voltage
on the gate, increases the conductivity of the channel thus increasing the drain
current
MOSFET Characteristics
This fig. shows typical drain curves for an N-channel D-MOSFET. For
VGS less than zero, we get depletion-mode operation, on the other hand, VGS
greater than zero given enhancement-mode of operation.
VGS 0 depletion VGS 0 enhancement
11
Chapter Four Field Effect Transistors
Fig.a
Output characteristics
Schematic Symbol
12
Chapter Four Field Effect Transistors
Biasing
D-MOSFET
1. The zero bias circuit.
V =0
GS
V ˃V
G S enhancement mode
V ˃V
S G depletion mode.
Enhancement mode
V =+V
GS G
13
Chapter Four Field Effect Transistors
A/ Construction
Fig. a shows the construction of E-MOSFET. It shows the normal biasing
polarities. As seen the substrate extends all the way to the insulating layer, there is
no N-channel, no connection between the drain and the source. When gate voltage
is zero, the VDD supply tries to force free electrons to flow from the source to drain,
but the P substrate has only a few thermally produced free electrons. As a result,
the drain current is almost zero. The E- MOSFET is a normally OFF.
Fig. a
14
Chapter Four Field Effect Transistors
B/ Operation
When VGS is positive (VGS0), the gate attracts
free electrons into the P-substrate region. These
free electrons recombine with the holes in
the p-substrate near the silicon dioxide layer.
When VGS is large enough, all these holes near
the silicon dioxide layer are with electrons and
the free electrons then acts as a channel between
the drain and the source electrons start flowing from source and drain. This layer
will become N-type because of the induced free electrons. The effect is as though
an N-type layer between the source and drain has been created (a channel has been
induced). This N-type layer is known as n-type inversion layer or induced channel.
This E-MOSFET is called the N induced channel E-MOSFET. When this layer is
formed, the terminal is turned on and free electrons can easily flow from the source
to drain. The minimum value of gate to source voltage V GS which can create
inversion layer is known as gate threshold gate voltage VGS(th).
Thus, the transistor is off when VGS VGS(th) and is on, when VGS VGS(th). Thus
the conducting capability of enhancement type MOSFET depends on the action of
N-type inversion layer.
The same can be said about the E-MOSFET where the drain and the source are of
P-type semiconductor, the substrate will be of N-type semiconductor but of course
the channel will a P-induced layer. What must the polarity of the voltage on the
gate be?
15
Chapter Four Field Effect Transistors
C/Symbol
D/ Characteristics
16
Chapter Four Field Effect Transistors
MOSFET can stand. These voltages values will result in the destruction of the
insulating layer).
From these curves, the transconductance curve can be drawn, which shows the
relation between Id and VGS. The equation of this curve is:
Id = k (VGS -VGS(th))2 where K is a constant
E/ Biasing
1) Drain feedback bias, Fig. a, a type of bias that you can use only with
enhancement type MOSFETs. When the MOSFET is conducting, it has a drain
current Id(on) and a drain voltage of VDS(on). Since the gate current is approximately
zero.
VG =VD
VDD -VD=ID RD
17
Chapter Four Field Effect Transistors
VG=VR2
18
The Universal Property of NAND and NOR Gates
The NAND Gate as a Universal Logic Element
The NAND gate is a universal gate because it can be used to produce the
NOT, the AND, the OR, and the NOR functions. An inverter can be made from a
NAND gate by connecting all of the inputs together and creating, in effect, a single
input.
̅̅̅̅̅ ̅
̅̅̅̅̅
̅ ̅ ̿ ̿
H.W.: In a similar manner, it can be shown that NOR gates can be arranged to implement
any of the Boolean operations.
Q1/ N-channel JFET in a self-biased circuit IDDS=1.65mA,VGS(OFF)=-2V, VDD=24V.
It is desired to bias at Id=0.8mA. Find the values of VGS, Rs, gm.
Sol.
1-
0.696 =1-
VGS = -0.607V
2- VGS=-IDRS
Rs= =-
Rs= 758.75
3- gm = -
gm = 2.29845mA/V
Q2/ Design a self-biased circuit of N-channel JFET at Id=1.6mA, VGS=-3V,
VDD=18V, VDS=10V.
VGS=VG-VS
= 0 - Id RS
RS = - = 1.8K
VDD=Id(RS+RD)+VDS
(RS+RD)= 5K
RD = 3.2 K