Digital electronics english sample R2024
Digital electronics english sample R2024
DIGITAL ELECTRONICS
DIGITAL
ELECTRONICS
P.N.Sankar M.E.
GEOMETRIC’S
SMART CLASS
N.POONGODI M.E. P.N.Sankar M.E.
Scan me
V.SUNDARA RAJA PANDIAN M.E.
REGULATION - 2023
III SEMESTER R2023
DIGITAL
ELECTRONICS
Electronics and Communication Engineering
Authors
N.POONGODI M.E.
K.KARTHIKEYAN M.E.
V.SUNDARA RAJA PANDIAN M.E.
DIGITAL ELECTRONICS
2024EC
ISBN: 978-93-92395-44-4
ISBN: 978-93-87810-50-1
Rs. 220/-
Printed by
Geometric Publications
Virudhunagar
Syllabus
DIGITAL ELECTRONICS
End
Continuous Assessment (40 marks)
Semester
Examination
CA1 CA2 CA3 CA4 (60 marks)
Written Written
Quiz / Model Written
Test Test (Unit
Mode (Unit I & II) III & IV) MCQ Examination Examination
Exam
60 60 40 100 100
Marks
Converted
20 20 10 10 60
to
Marks 40 60
Note:
• CA1 and CA2 Assessment test should be conducted.
Best of one will be considered for the internal
assessment of 20 Marks.
• CA3 Online quiz examination (MCQ) should be
conducted covering the complete syllabus. The marks
should be converted to 10 marks for the internal
assessment
• CA4 Model examination should be conducted as per
the end semester question pattern. The marks should
be converted to 10 marks for the internal assessment.
23 22 21 20 . 2-1 2-3
2-2
8 4 2 1 . ½ = 0.5 ¼ = 0.25 1/8 = 0.125
Example:
1010 .01 =
1x8 0x4 1x2 0x1 . 0 x 0.5 1 x 0.25
8 0 2 0 . 0 .25
Binary 1010 .01 = Decimal 10.25
Example:
567 .41 =
5 x 64 6x8 7x1 . 4 x 1/8 1 x 1/16
320 48 7 . 0.5 0.0625
Octal 567 .41 = Decimal 375.5625
Hexadecimal number system
• Has base 16 : ( )16
• Uses both alphabets and numerals
• Each number [called as bits] takes only 15 values:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E or F
• Each bit represents a multiple of a power of 16 which are
implied by the position of the digits.
• The place value of each position is given below:
Example:
A2E .12 =
A x 256 2 x 16 Ex1 . 1 x 1/16 2 x 1/32
2560 32 14 . 0.0625 0.0625
Hexa A2E .12 = Decimal 2606.125
25 24 23 22 21 20
1 0 1 0 0 1
( 41 )10 = ( 101001 )2
Checking:
(0.1011)2 = 1 x 2-1 + 0 x 2-2 + 1 x 2-3 + 1 x 2-4
= 0.5 + 0.125 + 0.0625
= (0.6875)10
2A) Converting a decimal number (integer part) to Octal:
1. Divide the integer part of the given decimal number by 8
2. Write the Quotient and remainder separately as shown
3. Continue the division till the quotient becomes 0
4. The octal equivalent is obtained from the remainders taken
is reverse order i.e. bottom to top
83 82 81 80
- 2 3 1
(153)10 = (231)8
(110101.01011)2 = (65.27)8
Octal digit 4 5 6 . 2 3
binary 100 101 110 . 010 011
groups of 3 bits
(456.23)8 = (100 101 110 .010 011)2
Problem
1. ADD 1010 + 1011 2. ADD 0111 + 1001
Carry 1 1 Carry 1 1 1 1
Augend 1 0 1 0 Augend 0 1 1 1
Addend 1 0 1 1 Addend 1 0 0 1
Sum 1 0 1 0 1 Sum 1 0 0 0 0
1.1.4 Binary subtraction
When two numbers are subtracted, the first number is called
minuend and the second number is called Subtrahend
The basic rules for subtraction are:
Digital Electronics I-14
Unit I Number system and Boolean algebra
0 -0 =0
1 -0 =1
1 -1 =0
0 -1 =1 difference = 1 and borrow =1
10 - 1 = 1 difference = 1 [as it is binary 2 - 1]
The logic circuit that performs subtraction of 1 bit is called a
half- subtractor.
Problem
1. Subtract 1011 - 0101 2. Subtract 1111 + 1001
Borrow 1 Borrow 1 1
minuend 1 0 1 1 minuend 1 1 0 1
Subtrahend 0 1 0 1 Subtrahend 0 1 1 1
Difference 0 1 1 0 Difference 0 1 1 0
1.1.5 BINARY CODES
Digital electronic circuits in computers and calculators use
mostly the binary code to represent numbers. Many other special
codes are used in digital electronics to represent numbers, letters,
and punctuation marks and control characters. These special codes
are generally called binary codes. Some of the special binary codes
are BCD code, Gray code, and Excess 3 code.
BCD code
BCD is an abbreviation for Binary-Coded Decimal. Here
decimal digits 0 through 9 are individually represented using their 4
bit binary equivalents.
For example, the decimal number 567 is expressed in BCD as:
Decimal number: 5 6 7
BCD number: 0101 0110 0111
Decimal 10 = Binary 1010 = BCD 0001 0000
As BCD numbers are decimal numbers, it is more preferred
than the binary representation although it occupies more space
Gray Code
It is a special binary code used in optical encoders. In this
code, only one bit will change each time the decimal number is
incremented. It is also called mirror code.
ASCII
• ASCII stands for American Standard Code for Information
Interchange.
• It is a seven bit code.
• The first three MSB bits represent whether a number letter or
character is coded.
• The last four bits represent the actual code of number letter or
character.
• Totally it contains 128 combinations of characters. 26
combinations represent letters in uppercase and another 26 for
representing lowercase letters. 10 combinations are used for
numerals.
Fig 2.6
• To represent the letter ‘A’, the code ‘100 0001’ is used. Similarly
to represent the letter ‘B’, the code ‘100 0010’ is used.
• In both cases the first 3 bits are same. But the remaining four
bits change according to a standard progressive value, i.e. it
varies from 0000 to 1111 respectively.
• Similarly the first three bits also follow a standard progression
from 000 to 111. Number ‘2’ is coded as 011 0010 and the letter
B is coded as 100 0010. The representation of ASCII code is
shown in the table.
Boolean theorems
Theorem 1 A+0=A
Theorem 2 A. 1 = A
Theorem 3 A + A = 1
Theorem 4 A.A = 0
Fig 1.9
The above theorem can be proved using truth table as given below
A B A B
0 0 1 1 1 1
0 1 1 0 0 0
1 0 0 1 0 0
1 1 0 0 0 0
Fig 1.10
The above theorem can be proved using truth table as given below
A B A B
0 0 1 1 1 1
0 1 1 0 1 1
1 0 0 1 1 1
1 1 0 0 0 0
A.(A+B) Start
A.(A + B) = A
Problem 2:
Simplify the following Boolean expression
Y = (A + B) (A + B)
Solution
Y = (A + B) (A + B) on multiplying we get
= AA +AB + BA + BB
= 0 +AB + AB + B
= B (A + A + 1)
= B (1 + 1) = B
Hence Y=B
(A + B)(A + C) Start
(A + B)(A + C) = A + B.C
AB(BC+AC) Start
AB(BC+AC) = ABC
Problem 6:
Draw a logic circuit for the expression Y = ABC ( A + D)
Problem 7:
Draw a logic circuit for the expression Y = AC + BC′ + A′BC
Problem 10:
Find the output of the following logic or Determine the output
expression for the circuit shown below and simplify it using De
Morgan’s theorem.
Problem 11:
Determine the output expression for the circuit shown below and
simplify it using De Morgan’s theorem.
Solution
3 A B C 0 1 1 1 A B C
4 ABC 1 0 0 0 A + B + C
5 AB C 1 0 1 1 AB C
6 A BC 1 1 0 0 A + B +C
Fig 1.31
OR Y = (A +B +C).(A + B + C). ( A + B )
S1 S2 Bulb S1 S2 Output
Open Open off 0 0 0
Open Closed Off 0 1 0
Closed Open Off 1 0 0
Fig 2.1 Closed Closed ON 1 1 1
OR gate
The OR gate has a high output when any one of its inputs is
high. Consider a two input OR gate. The truth table explains the
input conditions and their corresponding output. Hence the OR gate
output is high when either of the inputs A or B or BOTH are high.
The output is low when all the inputs are low and is true for n
number of inputs also.
The output is mathematically expressed as
Y=A+B
Symbol Truth table
A B Y=A + B
0 0 0
0 1 1
1 0 1
Fig 2.2
1 1 1
The operation of an OR gate can be
explained as similar to 2 switches in parallel – where the bulb at
output glows when either S1or S2or both the switches are closed
Fig 2.20
A B P1 P2 N1 N2 Y
0 0 on on off off 1
0 1 on off off on 1
1 0 off on on off 1
1 1 off off on on 0
Fig 2.22
CMOS as NAND gate
Propagation delay in 10 33 18
ns/gate
Speed power product (pJ) 100 33 10.8
Fig 2.23
Carry (C) = A . B
Fig 2.24
Working
Consider a two 1 bit input namely A and B. Their possible
states and corresponding sum and carry output is given in the form
of a truth table, as shown below:
A B Sum ∑ Carr Co
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
SUM = (A ⊕ B) ⊕ Cin
Fig 2.28
Working:
Considering the input columns and the difference output
alone, it is similar to truth table of an EX-OR gate. Similarly the
considering the input columns and the borrow output alone, it is
similar to an AND gate with input A and B. Hence a Half- subtractor
logic can be constructed using an EX-OR gate, AND gate and a
NOT gate as shown in the figure.
When two 1-bit binary numbers are subtracted, the EX-OR gate
gives the difference output and AND gate with input A and B gives
the borrow output.
Thus a half subtractor circuit is realized to subtract two 1bit
binary numbers using an AND, NOT and EX-OR gate.
Fig 2.29
Logical expression
Diff = (A ⊕ B) ⊕ Borrowin Borrow = AB + ( A ⊕ B)Borrowin
o 'A' and' B' are the input variables. These variables represent
the two significant bits that are going to be subtracted.
o 'Borrowin' is the third input which represents borrow.
o The 'Diff' and 'Borrow' are the output variables that define
the output values.
o The eight rows under the input variable designate all
possible combinations of 0 and 1 that can occur in these
variables.
Diff:
o Perform the XOR operation of input A and B.
o Perform the XOR operation of the outcome with 'Borrow'.
So, the difference is (A XOR B) XOR 'Borrowin' which is also
represented as: (A ⊕ B) ⊕ 'Borrowin'
Digital Electronics II-22
Unit II Logic gates & Arithmetic circuits
Borrow:
o Perform the 'AND' operation of the inverted input A and B.
o Perform the 'XOR' operation of input A and B.
o Perform the 'OR' operations of both the outputs that come
from the previous two steps. So the 'Borrow' can be
represented as: AB + ( A ⊕ B)Borrowin
Thus a full subtractor can be constructed to realize
subtraction of three 1-bit binary numbers using the above circuit.
Input Ci 0 1 1 0
carry
Augend Ai 1 0 1 1
Addend Bi 0 0 1 1
Sum Si 1 1 1 0
Output Ci +1 0 0 0 1 1
carry
Fig 2.30
Fig 2.31
Fig 2.32
A comparator used to compare two bits is called a single-bit
comparator. It consists of two inputs each for two single-bit
numbers and three outputs to generate less than, equal to, and
greater than between two binary numbers.
REVIEW QUESTIONS
3 marks questions
1. Draw the symbol for NAND gate. Write its truth table.[Apr 2017]
2. Which are known as universal gates? Why is it called so?
[Apr 2018]
3. What is known as tristate Logic? Explain with example
[Apr 2019]
4. What is the advantage of CMOS logic over TTL
Descriptive questions
1. Draw the symbol, truth table and logic equation for Ex-OR gate.
[Apr 2017]
2. With the diagram, explain the operation of TTL NAND gate.
[Apr 2017]
3. Construct AND, OR and NOT gates using only NOR gates.
3.0 INTRODUCTION
When logic gates are connected together to produce a
specified output for certain specified combinations of input variables,
with no storage involved, the resulting circuit is called combinational
logic.
A combinational circuit consists of input variables, logic
gates, and output variables. The logic gates accept signals from the
input variables and generate output variables.
The circuit designed to realize a Boolean expression is an
example of Combinational logic.
Fig .3.2
1:4 Demultiplexer
• A 1:4 demultiplexer has 1 data input line D
• 4 output lines Y0 Y1 Y2 Y3
• 2 selection line S0 S1
When S1 S0 = 00 input D is passed
on to the output Y0, so Y0 = D
When S1 S0 = 01 input D is passed
on to the output Y1, so Y1 = D
When S1 S0 = 10 input D is passed
on to the output Y2, so Y2 = D
When S1 S0 = 11 input D is passed on to the output Y3,
so Y3 = D
The logic diagram and truth table of 1:4 demux is shown in fig
4 : 1 line DeMultiplexer
3.3 DECODER
Decoder is a combinational circuit that has ‘n’ input lines and
maximum of 2n output lines.
Fig 3.5
3.3.1 2 TO 4 DECODER
In the 2 to 4 line decoder, there is a total of three inputs, i.e.,
A0, and A1 and E and four outputs, i.e., Y0, Y1, Y2, and Y3. For
each combination of inputs, when the enable 'E' is set to 1,
one of these four outputs will be 1.
Fig .3.6
Truth Table:
The logical expression of the term Y0, Y0, Y2, and Y3 is as follows:
Fig .3.7
Each output is having one product term. So, there are four product
terms in total. We can implement these four product terms by using
four AND gates having three inputs each & two inverters.
The circuit diagram of 2 to 4 decoder is shown in the following
figure.
Therefore, the outputs of 2 to 4 decoder are nothing but the min
terms of two input variables A1 & A0, when enable, E is equal to
one. If enable, E is zero, then all the outputs of decoder will be equal
to zero.
Fig 3.8
Fig 3.9
• BCD:Binary Coded Decimal : used to represent decimal digit
from 0 to 9 in a binary form[4 bits]
• 7-segment display : used to display the decimal output
• BCD to 7-segment decoder is a logic circuit which converts
the BCD (4 bits) code to 7- segment display code (7 bits).
• IC 7447 is a BCD to 7-segment decoder
• Combined with 7 segment display to display the decimal
numbers 0 to 9
• A truth table is tabulated to relate the input and output
combinations[ common cathode output]
• Eg to display ‘0’ we need to bias all segment except g
3 0 0 1 1 1 1 1 1 0 0 1
P2 1 1 1 1 1
4 0 1 0 0 0 1 1 0 0 1 1 P3 1 1 1 1 1
5 0 1 0 1 1 0 1 1 0 1 1
P4 1 1 1 1
6 0 1 1 0 1 0 1 1 1 1 1
P5 1 1 1 1 1
7 0 1 1 1 1 1 1 0 0 0 0
8 1 0 0 0 1 1 1 1 1 1 1 P6 1 1 1 1 1
9 1 0 0 1 1 1 1 1 0 1 1
P7 1 1 1
P8 1 1 1 1 1 1 1
P9 1 1 1 1 1 1
The block diagram gives the overall view of the decoder section
within the IC.
Fig 3.10
Thus a BCD to seven segment decoder is used to decode
the BCD input and drive the seven segments to display the various
numerals.
Digital Electronics III-9
Unit III Combinational logic circuits
3.4 ENCODER
• An encoder is a code converter circuit
• Generally it has 2n number of inputs and n outputs
• A 8:3 encoder has 8 [23] input and 3 output
• Only one of the inputs is active at a time
• An-bit code is generated, depending upon which of the input
is exited.
Octal to binary encoder (Decimal to BCD converter):
• It has 10 inputs and 4 outputs.
Fig 3.11 4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Fig 3.12
• The figure shows the decimal- to - BCD encoder.
Fig 4.1
Fig 4.2
Fig 4.3
4.1.2 Triggering
The process of applying clock to any sequential circuit is known as
triggering.
Clock Signal:
• It is used to trigger (activate) the sequential logic circuits.
• It is classified as raising (positive) edge clock signal and
falling (negative) edge clock signal.
Fig 4.4
FLIP-FLOPS
• Flip-flop is a one bit memory cell.
• It can store one bit of information′0′ or ′1′.
• A flip-flop has two outputs Q andQ.
4.1.3 SR flip-flop
Output
S R Qn+1
condition
. Pervious state /
0 0 Qn
No change
1 0 1 Set
0 1 0 Reset
Forbidden /
Fig 4.7 1 1 -
not allowed
0/1 1 0 0 1 1 0 1 0 Set
0/1 0 1 1 0 0 1 0 1 Reset
0 /1 1 1 0 0 1 1 1 1 forbidden
Fig 4.8
Fig 4.9
Preset and Clear are asynchronous inputs (and for the basic design
of flip flops low active) which are connected to the output side of
gates (NAND/NOR) as opposed to other inputs which are connected
with clock inputs.
The outputs of flip flop will change in accordance with state of inputs,
clock and last output. But if you want at the start of events or at any
moment that either all flip flops connected to be 1 or 0 Preset and
Clear inputs are activated respectively (momentarily making Low).
For the normal operation Preset and Clear are given High.
count QD QC QB QA
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
16 0 0 0 0
Circuit
Fig 4.18
Fig 4.22
Fig 4.23
TRUTH TABLE
OPERATION
Case 1: With M = 0 (Up counting mode)
If M = 0 and M = 1, then the AND gates 1 and 3 in fig. will be
enabled whereas the AND gates 2 and 4 will be disabled.
Hence QA gets connected to the clock input of FF-B and QB gets
connected to the clock input of FF-C.
These connections are same as those for the normal up counter.
Thus with M = 0 the circuit work as an up counter.
Case 2: With M = 1 (Down counting mode)
If M = 1, then AND gates 2 and 4 in fig. are enabled whereas the
AND gates 1 and 3 are disabled.
Hence QA gets connected to the clock input of FF-B and QB gets
connected to the clock input of FF-C.
These connections will produce a down counter. Thus with M = 1 the
circuit works as a down counter.
Fig 4.24
REVIEW QUESTIONS
3 marks questions
1. What is a latch?
2. What is a flip flop?
3. What is sequential logic? Give an example. [Oct 2019]
4. Define flip flop. [Apr 2017]
5. Draw the SR flip flop circuit. [Apr 2018]
6. Write about level triggering in flip flop. [Oct 2018]
7. Write a note on edge triggering in flip flop.
8. What is meant by triggering of flip-flop? [Oct 2019]
9. What is a synchronous counter?
10. Define asynchronous counter.
11. Draw the logic diagram of D flip flop and writes its truth table.
[Apr 2017]
12. Explain RS flipflop. [Oct 2018]
Digital Electronics IV-24
Unit IV Sequential Logic Circuits
13. What is race around condition? How is it eliminated in flip flop?
[Oct 2017]
14. Draw the logic diagram and truth table of T flip flop. [Oct 2017]
15. Draw the circuit of a JK master slave flip flop.
16. Write the truth table of a BCD counter.
17. What are the applications of flip-flops?
18. What are the applications of counters?
19. Write about the need of preset and clear in SR flip flop.
20. Compare synchronous and asynchronous counters. [Apr 2019]
Descriptive questions
1. Briefly explain SR latch using NAND and NOR gates and truth table.
2. Briefly explain D latch using NAND and NOR gates with diagrams and
truth table.
3. Describe the operation of clocked SR flip flop using NAND gates with
logic diagram and truth table
4. Describe the operation of D flip flop with logic diagram and truth table.
5. Describe the operation of T flip flop with logic diagram and truth table
6. Describe the operation of JK flip flop with logic diagram and truth table
7. With the logic diagram and truth table explain JK-MS flip flop.
[Apr 2017]
8. Explain the operation of a 4 bit asynchronous counter with the Logic
diagram and truth table. [Oct 2018]
9. Explain the working of 4 bit synchronous upcounter with
necessary sketch. [Apr 2019]
10. Explain the operation of a 3 bit asynchronous up/down counter with the
Logic diagram and truth table.
11. Explain the working of decade counter with necessary sketch.
[Oct 2019]
Fig 5.1
A register is a group of flip flops that can be used to store a binary
number.
• There must be one flip flop for each bit in the binary number.
• Hence to store an 4 bit binary number we require 4 flip flops.
• Hence the registers are cascaded such that output of one
register is fed as input to next register.
• Generally D flip flops are used where Q1 is connected to D2, Q2
to D3 and so on.
• When SR / JK flip flop is used, data to input S/J is inverted and
fed to R/K
There are two ways to enter data into a register: serial or
parallel and two ways to shift the data out of the register: serial and
parallel. Hence there are four basic register types:
1. Serial – in – serial out
2. Serial – in – parallel out
3. Parallel in – parallel out
4. Parallel in - parallel out
The data input is called write operation and data out is
called read operation.
Fig 5.2
A universal shift register can do all the above operations.
Digital Electronics V-1
Unit V Storage devices and logic families
5.1.1 SERIAL IN – SERIAL OUT
Fig 3.46
Fig 5.3
The above figure explains the bit transfer within the register.
Note bit A is entered into reg A at the end of 1st clock pulse, the
Fig 5.4
Fig 5.10
Fig 5.14
Fig 5.15
• It is a non-volatile memory.
• So it can retain the data even when the power is switched
off.
• A EPROM stores data that are often changed in an
applications.
• Write and erase operation are performed on byte basis.
Digital Electronics V-12
Unit V Storage devices and logic families
• This allows data to be written or erased in blocks. This
makes flash memory faster.
• Flash basic element is a floating gate transistor.
• The operation of flash is based on a process of removing
(erase) or putting (program) electrons on the floating gate.
• Charge on floating gate indicates a 0 or a 1.
• When electrons are present on the floating gate, no current
flows through the transistor, indicating logic 0.
• When electrons are removed from the floating gate, current
flows through the transistor, indicating logic 1.
• The process of forcing electrons to/from floating gate is
achieved by applying a voltage between a control gate and
source or drain.
Flash array configuration
Fig 5.15
Fig 5.16
Fig 5.17
Fig 5.18
Fig 5.23
Fig 5.24
There are several lines that are used in the read and write
operations:
• CAS, the Column Address Strobe: This line selects the
column to be addressed. The address inputs enables a row
for read or write operations.
• OE, Output Enable: The OE signal is used to control
multiple memory chips in parallel.
• RAS, the Row Address Strobe: This line selects the row
to be addressed.
• WE, Write Enable: This signal when Low enables the write
action, while high enables a read action.
Refresh operation:
1. To enable the Refresh operation, R/𝑊𝑊 line, ROW line and
REFRESH line are made HIGH.
2. The transistor is turned ON and the capacitor is connected
to COLUMN line.
3. As R/𝑊𝑊 is HIGH, the output buffer is enabled and the stored
data bit is applied to the input of the refresh buffer.
Sl.
RAM ROM
No.
1. RAM stands for Random ROM stands for Read Only
Access Memory Memory
2. Temporary storage Permanent storage
3. Store data in MBs Store data in GBs
4. Volatile Non volatile
Digital Electronics V-23
Unit V Storage devices and logic families
It should be clear that when A13 = 1, the roles of RAM A and RAM B
are reversed. RAM ‘B’ is now enabled and the lines A12 – A0 select
one of its location. Thus the range of addresses located in RAM ‘B’
is from 2000H to 3FFFH.
CACHE MEMORY
If the active part of the program and data can be kept in fast
memory, the total execution time can be reduced significantly. Such
memory is known as cache memory, which is inserted between the
CPU and the main memory.
The data or contents of the main memory that are used frequently by
CPU are stored in the cache memory so that the processor can
easily access that data in a shorter time. Whenever the CPU needs
to access memory, it first checks the cache memory. If the data is
not found in cache memory, then the CPU moves into the main
memory.
Cache memory is placed between the CPU and the main memory.
The block diagram for a cache memory can be represented as:
Disadvantages:
1. Limited capacity
2. Complex.
Fig 5.26