Digital Electronics
Digital Electronics
Digital Electronics
Introduction
Unlike a linear, or analogue circuit which contains signals that are
constantly changing from one value to another, such as amplitude
or frequency, digital circuits process signals that contain just two
voltage levels or states, labelled logic "0" and logic "1".
The output from the potentiometer varies as the wiper terminal is rotated producing
an infinite number of voltage points between 0 volts and V max. As the voltage
output varies either slowly or rapidly there is no sudden change between two
voltage levels giving a continuous output voltage.
Examples of analogue signals include temperature, pressure, liquid
levels and light intensity
Digital Circuits
Digital Circuits - Digital circuits produce or respond too two distinct
voltage levels representing either a Logic level "1" or a Logic level
"0".
As the wheel rotates, the optoswitch will generate an output that changes quickly
beetween two discrete voltage levels. For example, 5V volts to 0 volt but NOT
2.5V, 3.1V or 4.6V.
Then the major difference between an analogue signal or quantity
and a digital quantity is that an "Analogue" quantity is
continuously changing over time while a "Digital" quantity has
discrete (step by step) values. LOW to HIGH or HIGH to LOW
Voltage Levels
In all electronic circuits, only two logic levels are allowed and these levels are
referred to as "logic 1 or logic 0", "high or low", "true or false".
Most logic systems use positive logic, in which a logic "0" is
represented by zero volts and a logic "1" is represented by a higher
voltage, such as +5 volts .
However, between these defined HIGH and LOW values lies what is generally
called a "no-man's land" (the blue area's above) and if we apply a signal voltage
of a value within this no-man's land area we do not know whether the logic gate
will respond to it as a level "0" or as a level "1", and the output will become
unpredictable.
Decimal to Binary Conversion
The Decimal or "denary" counting system uses the Base of
10 numbering system where each digit in a number takes on one of
ten possible values from 0 to 9, eg 213 (Two Hundred and
Thirteen).
In a decimal system each digit has a value ten times greater than its
previous number and this decimal numbering system.
In the decimal or denary system, the columns have values of units,
tens, hundreds etc as we move from right to left and
mathematically these values are written as 10 0, 101, 102, 103 etc
(6×103) + (1×102) + (6×101) + (3×100) = 6163
Decimal to Binary Conversion
Unlike the decimal numbering system which uses the base of 10,
digital logic uses just two values or states, a logic level "1" or a
logic level "0", so each "0" and "1" is considered to be a single
digit in a Base of 2 orBinary numbering system.
In the binary numbering system, each digit has a value twice that of
the previous digit but can only have a value of either "1" or "0“
28 27 26 25 24 23 22 21 20
Decimal Digit Value 256 128 64 32 16 8 4 2 1
Binary Digit Value 1 0 1 1 0 0 1 0 1
the memory of a computer would use hexadecimal numbers while the keyboard
uses decimal numbers
Hexadecimal (16)
the Hexadecimal numbering system uses only four digits to express a
single 16-bit word length, and as a result it is the most commonly
used Binary Numbering System for electronic and micro-
electronic system
Decimal 4-bit Binary Hexadecimal Decimal 4-bit Binary Hexadecimal
0 0000 0 9 1001 9
1 0001 1 10 1010 A
2 0010 2 11 1011 B
3 0011 3 12 1100 C
4 0100 4 13 1101 D
5 0101 5 14 1110 E
6 0110 6 15 1111 F
7 0111 7 16 0001 0000 10 (1+0)
8 1000 8 17 0001 0001 11 (1+1)
Continuing upwards in groups of four
Using Hexadecimal Numbers
Counting:
0...to...9, A,B,C,D,E,F, 10...to...19, 1A, 1B, 1C, 1D, 1E, 1F, 20, 21
Conversions
3A16 = (0011
1010)2=0*128+0*64+1*32+1*16+1*8+0*4+1*2+0*1=58
3A16 =3*16+10*1=58
20F16=2*256+0*16+15=527
Boolean (or Switching) Algebra
Besides basic arithemtical operations, the binary numbers, which are
inherently represents true or false logic states, are also used in
logical operations.
Boolean (or Switching) Algebra deals mainly with the theory that
both logic and set operations are either "TRUE" or "FALSE" but
not both at the same time.
For example, A + A = A and not 2A as it would be in normal algebra.
Boolean algebra is a simple and effective way of representing the
switching action of standard Logic Gates and the basic logic
statements.
The logic AND Function
The Logic AND Function function states that two or more events
must occur together and at the same time for an output action to
occur. But the order at which they occur is unimportant as it does
not affect the final result
The logic AND Function
Switch Switch
Output Description
A B
0 0 0 A and B are both open, lamp OFF
A is open and B is closed, lamp
0 1 0
OFF
A is closed and B is open, lamp
1 0 0
OFF
A is closed and B is closed, lamp
1 1 1
ON
Boolean Expression
The logic AND Gate
TTL Logic Circuit TTL Logic Types
74LS08 Quad 2-input
74LS11 Triple 3-input
74LS21 Dual 4-input
Switch Switch
Output Description
A B
0 0 0 A is open and B is 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
A is closed and B is closed, lamp
1 1 1
ON
Boolean Expression
A+B
(A OR B)
The logic OR Gate
TTL Logic Circuit TTL Logic Types
74LS32 Quad 2-input
Switch Output
1 0
0 1
Boolean
A
Expression
The NAND or Not AND function
The NAND or Not AND function is a combination of the two
separate logical functions, the AND function and
the NOT function connected together in series.
NAND
Identity Law - A term OR´ed with a "0" or AND´ed with a "1" will
always equal that term.
– A + 0 = A, A variable OR'ed with 0 is always equal to the variable.
– A . 1 = A, A variable AND'ed with 1 is always equal to the variable.
(1) Two separate terms NOR´ed together is the same as the two terms
inverted (Complement) andAND´ed for example,
A+B = A. B
(2) Two separate terms NAND´ed together is the same as the two
terms inverted (Complement) and OR´ed for example,
A.B = A +B.
The Laws of Boolean
A⊕B
The Boolean Algebra
Example
Using the above laws, simplify the following expression:
Q=(A + B)(A + C)
Q=(A + B)(A + C)
Q=AA + AC + AB + BC - Distributive law
Q=A + AC + AB + BC - Identity AND law (A.A = A)
Q=A(1 + C) + AB + BC - Distributive law
Q=A.1 + AB + BC - Identity OR law (1 + C = 1)
Q=A(1 + B) + BC - Distributive law
Q=A.1 + BC - Identity OR law (1 + B = 1)
Q=A + BC - Identity AND law (A.1 = A)
OR
NOT
The Boolean Algebra
This will prevent the unused input to the gate from "floating" about
and producing false switching of the gate and circuit.
Combinational Logic Circuits
Combinational Logic Circuits consist of inputs, two or more basic
logic gates and outputs. The logic gates are combined in such a
way that the output state depends entirely on the input states.
Combinational logic circuits have "no memory", "timing" or
"feedback loops", there operation is instantaneous.
Addressing
Input
b a Selected
0 0 A
0 1 B
1 0 C
1 1 D
The Demultiplexer
The data distributor, known more commonly as a Demultiplexer or
"Demux", takes one single input data line and then switches it to
any one of a number of individual output lines one at a time.
The demultiplexer converts a serial data signal at the input to a
parallel data at its output lines as shown below.
Addressing
Output
b a Selected
0 0 A
0 1 B
1 0 C
1 1 D
Binary Encoder
Binary Encoder takes ALL its data inputs one at a time and then
converts them into a single encoded output.
So we can say that a binary encoder, is a multi-input combinational
logic circuit that converts the logic level "1" data at its inputs into an
equivalent binary code at its output.
Binary Output
Compass
Direction Q0 Q1 Q2
North 0 0 0
North-East 0 0 1
East 0 1 0
South-East 0 1 1
South 1 0 0
South-West 1 0 1
West 1 1 0
North-West 1 1 1
The Decoder
Encoder is basically, a combinational type logic circuit that converts
the binary code data at its input into one of a number of different
output lines, one at a time producing an equivalent decimal code at
its output.
A decoders output code normally has more bits than its input code
and practical binary decoder circuits include, 2-to-4, 3-to-8 and 4-
to-16 line configurations.
BCD to 7-Segment Display Decoder
Decoder IC, is a device which converts one digital format into
another and the most commonly used device for doing this is the
Binary Coded Decimal (BCD) to 7-Segment Display Decoder.
Inputs Outputs
B A A>B A=B A<B
0 0 0 1 0
0 1 1 0 0
1 0 0 0 1
1 1 0 1 0
Sequential Logic
Sequential Logic circuits have some form of inherent "Memory" built
in to them as they are able to take into account their previous input
state as well as those actually present, a sort of "before" and "after"
is involved with sequential circuits.
The output state of a sequential logic circuit is a function of the
following three states, the "present input", the "past input" and/or
the "past output". Sequential Logic circuits remember these
conditions and stay fixed in their current state until the next clock
signal changes one of the states, giving sequential logic circuits
"Memory".
Sequential logic circuits are generally termed as two state or Bistable
devices which can have their output or outputs set in one of two
basic states, a logic level "1" or a logic level "0" and will remain
"latched" indefinitely in this current state or condition until some
other input trigger pulse or signal is applied which will cause the
bistable to change its state once again.
Sequential Logic Representation
The word "Sequential" means that things happen in a "sequence", one
after another and in Sequential Logic circuits, the actual clock
signal determines when things will happen next.
1. Event Driven - asynchronous circuits that change state immediately when enabled.
2. Clock Driven - synchronous circuits that are synchronised to a specific clock
signal.
3. Pulse Driven - which is a combination of the two that responds to triggering pulses.
RS Flip Flop
The SR flip-flop, also known as a SR Latch, can be considered as one
of the most basic sequential logic circuit possible.
This simple flip-flop is basically a one-bit memory bistable device
that has two inputs, one which will "SET" the device (meaning the
output = "1"), and is labelled S and another which will "RESET"
the device (meaning the output = "0"), labelled R.
Then the SR description stands for "Set-Reset".
The reset input resets the flip-flop back to its original state with an
output Q that will be either at a logic level "1" or logic "0"
depending upon this set/reset condition
RS Flip Flop
Active low RS Flip flop implementation with NAND gates
State S R Q Q Description
1 0 1 0 Set Q » 1
Set
1 1 1 0 no change
0 1 0 1 Reset Q » 0
Reset
1 1 0 1 no change
0 0 0 1 memory with Q = 0
Invalid
0 0 1 0 memory with Q = 1
SR Flip Flop
Nor gate RS Flip Flop
JK Flip Flop
The JK flip-flop is basically a gated SR flip-flop with the addition of
a clock input circuitry that prevents the illegal or invalid output
condition that can occur when both inputs S and R are equal to
logic level "1". Due to this additional clocked input, a JK flip-flop
has four possible input combinations, "logic 1", "logic 0", "no
change" and "toggle"
JK Flip Flop Truth Table
C J K Q(n) Q(n+1)
Delete 1 0 1 0,1 0,0
Write 1 1 0 1,0 1,1
Save 1 0 0 0,1 0,1
Toggle 1 1 1 1,0 0,1
D Flip Flop
The D flip-flop is by far the most important of the clocked flip-flops
as it ensures that ensures that inputs S and R are never equal to one
at the same time.
D-type flip-flops are constructed from a gated SR flip-flopwith an
inverter added between the S and the R inputs to allow for a
single D (data) input.
This single data input D is used in place of the "set" signal, and the
inverter is used to generate the complementary "reset" input
thereby making a level-sensitive D-type flip-flop from a level-
sensitive RS-latch as now S = D and R = not D
D Flip Flop
Clk D Q Q Description
Memory
↓»0 X Q Q
no change
↑»1 0 0 1 Reset Q » 0
↑»1 1 1 0 Set Q » 1
D Flip Flop / Data Latch
D Flip Flop- Frequency divider
The Clock
As seen in previous applications, Sequential Logic circuits to
operate in a "sequential" way, they require the addition of a clock
pulse or timing signal to cause them to change their state.
Clock pulses are generally continuous square or rectangular shaped
waveform that is produced by a pulse generator.
This multivibrator circuit oscillates between a "HIGH" state and a
"LOW" state producing a continuous output.
Sequential logic circuits that use the clock signal for synchronization
are dependant upon the frequency and and clock pulse width to
activate there switching action.
The Clock
Active HIGH - if the state changes occur at the clock's rising edge or
during the clock width.
Active LOW - if the state changes occur at the clock's falling edge.
Duty Cycle - is the ratio of clock width and clock period.
Clock Width - this is the time during which the value of the clock
signal is equal to one.
t2 = 0.693 (R2) C1
T = t1 + t2
NAND Gate Monostable Circuit
Monostable Multivibrators or "one-shot" pulse generators are used
to convert short sharp pulses into wider ones for timing
applications. Monostable multivibrators generate a single output
pulse, either "high" or "low", when a suitable external trigger
signal or pulse T is applied.
The bistable multivibrator
The bistable multivibrator can be switched over from one stable state
to the other by the application of an external trigger pulse thus, it
requires two external trigger pulses before it returns back to its
original state
Find the Boolean algebra expression for
the given system.
Find the Boolean algebra expression for
the given system.
Draw the digital logic circutis for the given Boolean algebra expression and simplify
the expression if possible.
Draw the digital logic circutis for the given Boolean algebra expression and simplify
the expression if possible.
Thanks for your interest.