Digital Electronics
Digital Electronics
Contents:
S.No Topic Page no.
1. Analog and digital signals, logic gates, Boolean Algebra, 2 – 20
Demorgan’s theorem, Number system, 1’s complement, 2’s
complement arithmetic operations, number system conversion.
2. Codes: BCD, Excess code, Gray code, Octal code, Hexadecimal 21 – 25
code, Alphanumeric codes, Error codes.
3. Digital logic families. 26 – 33
4. Combinational logic design: K – Map. 34 – 43
5. Arithmetic circuits, BCD to Seven segment decoder, Binary to 44 – 53
gray code converter, gray to binary converter, multiplexers, DE
multiplexers.
6. Adders, subtraction, BCD arithmetic, digital comparators, Parity 54 – 65
generators/Checkers, BCD to binary converter, Binary to BCD,
Priority encoders: Decimal to BCD encoder, octal to binary, BCD
to decimal decoder BCD to seven segment decoder I/C.
7. Flip flops. 66 – 71
8. Counters. 72 – 76
9. A/D and D/A converters. 77 – 87
10. Semiconductor memories. 88 – 94
11. Programmable logic devices. 95 – 96
1
Page
CHAPTER – 1
Analog and Digital Signals:
There are basically two types of signals, analog and digital.
a) Analog signals: Analog signal is defined as voltage or current whose size is proportional to the quantity
it represents. Analog signal is continuous and has infinite set of possible values.
In the real work most of the quantities such as sound, velocity, weight, pressure and temperature etc
are analog in nature. For this reason, analog signals that often represent these values are the most
common type monitored, processed and controlled by electronic circuitry.
b) Digital Signals: A digital signal is one which changes between two discrete levels of voltage. These
changes are very sudden. Figure illustrate that the most positive fixed voltage represents 1 state.
Similarly most negative voltage represents 0 state.
Digital signals represent the real quantities by means of group of 0 and1. Group of 0 and 1s in some
orderly format can represent unlimited information.
OR Operation:
Y = A OR B OR C ……. OR N
= A + B + C + ……. + N
Truth table of 2 – input OR Gate:
Inputs Output
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
NOT Operation:
Y = NOT A
=A̅
Truth table of NOT Gate:
Inputs Output
A B Y
0 1 1
1 0 0
NAND Operations:
Y = (̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
AB … … . . N)
Truth table of NOT Gate:
Inputs Output
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
NAND Gate as a universal Gate
NOR Operation:
Y’ = A + B + ……. + N
Y = Y̅′ = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
A + B + ⋯+ N
3
Exclusive OR Gate:
Y=AB
= A̅ B + AB
̅
Inputs Output
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
a) 0 c) 3
Page
b) 1 d) 2
Ans a
Question:
A NOT gate has (DMRC JE)
a) Two inputs and one output c) One input and two outputs
b) One input and one output d) None of the above
Ans. b
Question:
An OR gate has (DMRC JE)
a) Two inputs and one output c) One input and two outputs
b) One input and one output d) None of the above
Ans. a
Question:
The output of a logic gate can be one of two ______? (DMRC JE)
a) Inputs c) States
b) Gates d) None
Ans. a
Question:
Logic states can only be _____ or 0. (DMRC JE)
a) 3 c) 1
b) 2 d) 0
Ans. c
Question:
The output of a _______ gate is only 1 when all of its inputs are 1 (DMRC JE)
a) NOR c) AND
b) XOR d) NOT
Ans. c
Question:
A NAND gate is equivalent to an AND gate pulse a _______ gate put together (DMRC JE)
a) NOR c) XOR
b) NOT d) None
Ans. b
Question:
Universal gates are: (JE Signal Telecom)
a) AND, OR c) OR, NOT
b) AND, NOT d) NAND, NOR
Ans. d
Question:
AND Act as a (JE Signal Telecom)
a) Parallel circuit c) Series parallel circuit
b) Series circuit d) None of the above
Ans. b
Question:
The output of a two input NAND gate is low: (JE Signal Telecom)
a) Only if both the inputs are high c) Only if one input is high and the other is low
b) Only if both the inputs are low d) Only if at least one of the input is low
Ans. a
Boolean Algebra:
5
Page
Theorem 1.1: A + 0 = A
If A = 0 then 0 + 0 = 0 = A
And if A = 1 then 1 + 0 = 1 = A
And hence the theorem is proved
Table: Boolean algebraic theorems
Theorem No. Theorem
1.1. A+0=A
1.2. A.1 = A
1.3. A+1=1
1.4. A.0 = 0
1.5. A+A=A
1.6. A.A = A
1.7. A+A ̅=1
1.8. ̅
A. A = 0
1.9. A. (B + C) = AB + AC
1.10. A + BC = (A + B)(A + C)
1.11. A + AB = A
1.12. A (A + B) = A
1.13. A+A ̅B = (A + B)
1.14. A (A̅ + B) = AB
1.15. AB + AB ̅=A
1.16. (A + B).(A + B ̅) = A
1.17. AB + A ̅C = (A + C) (A̅ + B)
1.18. (A + B)( A̅ + C) = AC + A ̅B
1.19. ̅
AB + AC + BC = AB + AC ̅
1.20. (A + B) (A̅ + C)(B + C) = (A + B)( A
̅ + C)
1.21. ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
A. B. C … … . . = A̅+B ̅ + C̅ + ……….
1.22. ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
A+B+C+⋯=A ̅. B
̅. C̅ …….
ABC = ̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅ (AB). C
Page
̅̅̅̅̅̅̅̅
= (A. B) + C̅
=A̅+ B ̅ + C̅
In a similar way, the NOR operation of three variable gives
A + B + C = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅̅̅̅̅̅̅̅ (A + B) + C
̅̅̅̅̅̅̅̅̅̅
= (A + B). C̅ = A
̅. B
̅. C̅
Boolean Laws:
a) Commutative laws:
A+B=B+A
c) Distributive law:
A (B + C) = AB + AC
Question:
If two inputs A and B of Figure are applied to input OR gate, find the output waveform
Solution:
When either or both inputs are high, the output Y will be high
Question:
If two inputs A and B of Figure are applied to two input NAND gate find the output waveform.
Solution:
The output is low only when both inputs are high as shown in figure.
Question:
If two waveforms A and B of Figure are applied to two input NOR gate, draw the resulting waveform
produced at the output.
Solution:
7
Solution:
The output goes high only when both inputs are at the same state as shown in figure.
Question:
Apply De Morgan’s theorem to following expressions:
a) ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅̅̅̅̅
(A + B) + C̅ ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
b) ̅̅̅̅̅̅̅̅̅̅
̅ + B) + ̅̅̅̅
(A CD
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
c) (A + B)CD̅̅̅̅ + E + F̅
Answer:
a) ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅̅̅̅̅
(A + B) + C̅ = ̅̅̅̅̅̅̅̅̅̅
(A + B). C̿ = (A + B)C
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
b) ̅̅̅̅̅̅̅̅̅̅
̅ + B) + CD
(A ̅̅̅̅ = ̅̅̅̅̅̅̅̅̅̅
̅ + B). CD
(A ̅̅̅̅ = (A
̅ + B)CD
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
c) (A + B)CD ̅̅̅̅ + E + F̅
̅̅̅̅̅̅̅̅̅̅̅̅̅̅
= (A + B)CD ̅̅̅̅ ̅̅̅̅̅̅̅̅ ̅B
E + F̅ = (A ̅ + C + D)E ̅F
Question:
A NOR gate is equivalent to a bubbled AND gate. This statement is an outcome of: (DMRC 2016)
a) De Morgan’s law c) Law of absorption
b) Involution law d) Idempotent law
Ans. a
Question:
Which of the following relation is true for two digital signals A and B? (DMRC 2016)
a) ̅̅̅̅̅̅̅
A+B = A ̅. B
̅ c) ̅̅̅̅̅̅̅
A+B = A ̅. B
̅ + A.B
̅̅̅̅̅̅̅
b) A + B = A.B ̅̅̅̅̅̅̅ ̅
d) A + B = A. B
Ans. a
Question:
The number of bits in a nibble is (DMRC JE)
a) 16 c) 4
b) 5 d) 8
Ans. c
Number System:
Binary – to – Decimal Conversion:
Any binary number can be converted into its equivalent decimal number using the weights assigned to
each bit position.
Question:
Find the decimal equivalent of the binary number (1 1 1 1 1)2
Answer:
The equivalent decimal number is
8
= 1 X 24 + 1 X 23 + 1 X 22 + 1 X 21 + 1 X 20
Page
= 16+ 8 + 4 + 2 + 1 = (31)10
Question:
Determine the decimal numbers represented by the following binary numbers:
a) 110101 c) 111111111
b) 101101 d) 00000000
Answer:
a) (110101)2 = 1 X 25+ 1 X 24 + 0 X 23 + 1 X 22 + 0 X 21+ 1 X 20
= 32 + 16 + 0 + 4 + 0 + 1 = (53)10
b) (101101)2 = 32 + 0 + 8 + 4 + 0 + 1 = (45)10
c) (11111111)2 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = (255)10
d) (00000000)2 = (0)10
Question:
Convert (13)10 to an equivalent base 2 number
Answer:
Question:
Convert (0.65625)10 to an equivalent base – 2 number
Answer:
Question:
Express the following decimal numbers in the binary form
a) 25.5 b) 10.625 c) 0.6875
Answer:
a) Integer part
Therefore,
(0.6875)10 = (0.1011)2
Question:
Find the 2’s complement of the numbers:
a) 01001110 b) 00110101
Solution:
Binary addition:
The rules of binary addition are given in table
Table:
Rules of binary addition
Augend Addend Sum Carry Result
0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 0 1 10
In the first three rows above, there is no carry, that is, carry = 0, whereas in the fourth row a carry is
produced (since the largest digit possible is 1), that is, carry = 1 and similar to decimal addition it is added
to the next higher binary position.
Question:
12
Solution:
Question:
Add the binary numbers:
01101010
00001000
10000001
11111111
Answer:
The sum = 1 1 1 1 1 0 0 1 0
From the above example, we observe the following:
i) If the number of 1’s to be added in a column is even then the sum bit is 0 and if the number of 1’s to be
added in a column is odd then the sum bit is 1.
ii) Every pair of 1’s in a column produces a carry (1) to be added to the next higher bit column.
Binary Subtraction:
The rules of binary subtraction are given in table
Table:
Rules of binary subtraction
Minuend Subtrahend Difference Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Except in the second row above, the borrow = 0. When the borrow = 1, as in the second row, this is to be
subtracted from the next higher binary bit as it is done in decimal subtraction.
Question:
Perform the following subtraction:
Here, in columns 1 and 2, borrow = 0 and in column 3 it is 1. Therefore, in column 4 first subtract 0 from 1
and from this result obtained subtract the borrow bit.
Binary Multiplication:
13
Binary multiplication is similar to decimal multiplication. In binary, each partial product is either zero
(multiplication by 0) or exactly same as the multiplicand (multiplication by 1). An example of binary
Page
In a digital circuit, the multiplication operation is performed by repeated addition of all partial products to
obtain the full product.
Binary Division:
Binary division is obtained using the same procedure as decimal division. An example of binary division is
given below
Question:
Divide 1 1 1 0 1 0 1 by 1 0 0 1
Solution:
Question:
Perform the following operations using 2’s complement method:
i) 48 – 23 iv) 48 – 23
ii) 23 – 48
iii) 48 – ( 23)
Use 8 – bit representation of numbers
Solution:
i) 2’s complement representation of +48 = 00110000
2’s complement representation of 23 = 11101001
48 + ( 23)
iii) 48 – ( 23) = 48 + 23
Page
iv) 48 – 23 = ( 48) + ( 23)
Question:
Convert (736)8 into an equivalent binary number
Solution:
From table, we observer the binary equivalents of 7, 3 and 6 as 111, 011 and 110, respectively. Therefore,
(736)8 = (111 011 110)2
Binary – to – Octal conversion:
Binary numbers can be converted into equivalent octal numbers by making groups of three bits starting
from LSB and moving towards MSB for integer part of the number and then replacing each group of three
bits by its octal representation. For fractional part, the groupings of three bits are made starting from the
binary point.
Question:
Convert (10011110)2 to its octal equivalent
Answer:
(1001110)2 = (001 001 110)2
= (1 1 6)8 = (116)8
Question:
Convert (0.10100110)2 to its equivalent octal number
Answer:
(0.10100110)2 = (0.101 001 100)2
= (0.5 14)2 = (0.514)2
Question:
Convert the following binary numbers to octal numbers
a) 11001110001.000101111001
b) 1011011110.11001010011
c) 111110001.10011001101
Solution:
a) 011 001 110 001.000 111 001= (3161.0571)8
b) 001 011 011 110.110 010 100 110 = (1336.6246)8
c) 111 110 001.100 110 011 010 = (761.4632)8
From the above examples we observe that in forming the 3 – bit groupings, 0’s may be required to
complete the first (most significant digit) group in the integer part and the last (least significant digit)
group in the fractional part.
Octal Arithmetic:
Octal arithmetic rules are similar to the decimal or binary arithmetic. Normally, we are not interested in
performing octal arithmetic operations using octal representation of numbers. This number system is
normally used to enter long strings of binary data into a digital system like a microcomputer. This makes
the task of entering binary data in a microcomputer easier. Arithmetic operations can be performed by
converting the octal numbers to binary numbers and then using the rules of binary arithmetic.
Question:
Add (23)8 and (97)8
Solution:
16
Page
Question:
Subtract
a) (37)8 from (67)8
b) (75)8 from (26)8
Solution:
Using 8 – bit representation
Table:
Binary and decimal equivalents of octal numbers
Octal Decimal Binary
0 0 000
1 1 001
2 2 010
3 3 011
4 4 100
5 5 101
6 6 110
7 7 111
10 8 001000
11 9 001001
12 10 001010
13 11 001010
14 12 001011
15 13 001100
16 14 001110
17 15 001111
8 8 1000
9 9 1001
Page
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111
Question:
Convert the following decimal numbers into hexadecimal numbers.
a) 95.5 b) 675.625
Solution:
a) Integer part
Question:
18
Question:
Convert the following binary numbers to their equivalent hex numbers.
a) 10100110101111 b) 0.00011110101101
Solution:
(0.00011110101101)2 = (0.1EB4)16
Question:
Convert the following hex numbers to octal numbers.
a) A72E b) 0.BF85
Solution:
Question:
Convert (247.36)8 to equivalent hex number.
Solution:
(247.36)8 = (010 100111.011 110)2
= (0 1010 0111.0111 1000)2 = (A 7.78)16
Hexadecimal Arithmetic:
The rules for arithmetic operations with hexadecimal numbers are similar to the rules for decimal, octal
and binary systems. The information can be handled only in binary form in a digital circuit and it is easier to
enter the information using hexa – decimal number system. Since arithmetic operations are performed by
the digital circuits on binary numbers, therefore hexadecimal numbers are to be first converted into binary
numbers. Arithmetic operations will become clear from the following examples.
Question:
Add (7F)16 and (BA)16
19
Answer:
Page
Question:
Subtract
a) (5C)16 from (3F)16
b) (7A)16 from (C0)16
Solution:
Multiplication and division can also be performed using the binary representation of hexadecimal numbers
and then making use of multiplication and division rules of binary numbers.
20
Page
CHAPTER – 2
Codes:
Computers and other digital circuits process data in the binary format. Various binary codes are used to
represent data which may be numeric, alphabets or special characters. Although, in every code used the
information is represented in binary form, the interpretation of this binary information is possible only if
the code in which this information is available is known. For example, the binary number 1000001
represents 65 (decimal) in straight binary, 41 (decimal) in BCD and alphabet A in ASCII code. A user must be
very careful about the code being used while interpreting information available in the binary format. Codes
are also used for error detection in digital systems.
Some of the commonly used codes are given below.
Straight binary code:
This is used to represent numbers using natural (or straight) binary form. Various arithmetic operations can
be performed in this form. Binary codes for decimal numbers 0 to 15 are given in table.
Natural BCD Code:
In this code, decimal digits 0 through 9 are represented (coded) by their natural binary equivalents using
four bits and each decimal digit of a decimal number is represented by this four bit code individually. For
example, (23)10 is represented by 0010 0011 using BCD code, rather than (10111) 2. From this it is observed
that is requires more number of bits to code a decimal number using BCD code than using the straight
binary code. However, inspite of this disadvantage it is very convenient and useful code for input and
output operations in digital systems.
This code is also known as 8 – 4 – 2 – 1 code or simply BCD code 8,4,2 and 1 are the weights of the four bits
of the binary code of each decimal digit similar to straight binary number system. Therefore, this is a
weighted code and arithmetic operations can be performed using this code, which will be discussed BCD
codes for decimal digits 0 through 9 are given in table.
Table:
Various binary codes
Decimal number Binary BCD Excess – 3 Gray
B3 B2 B1 B0 D C B A E 3 E2 E1 E0 G3 G2 G1 G0
0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0
1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1
2 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 1
3 0 0 1 1 0 0 1 1 0 1 1 0 0 0 1 0
4 0 1 0 0 0 1 0 0 0 1 1 1 0 1 1 0
5 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1
6 0 1 1 0 0 1 1 0 1 0 0 1 0 1 0 1
7 0 1 1 1 0 1 1 1 1 0 1 0 0 1 0 0
8 1 0 0 0 1 0 0 0 1 0 1 1 1 1 0 0
9 1 0 0 1 1 0 0 1 1 1 0 0 1 1 0 1
10 1 0 1 0 1 1 1 1
11 1 0 1 1 1 1 1 0
12 1 1 0 0 1 0 1 0
13 1 1 0 1 1 0 1 1
14 1 1 1 0 1 0 0 1
15 1 1 1 1 1 0 0 0
Excess code:
21
This is another form of BCD code, in which each decimal digit is coded into a 4 – bit binary code. The code
for each decimal digit is obtained by adding decimal 3 to the natural BCD code of the digit. For example,
Page
decimal 2 is coded as 0010 + 0011 = 0101 in Excess 3 code. It is not a weighted code. This code is a self
complementing code, which means 1’s complement of the coded number yields 9’s complement of the
number itself. For example, Excess – 3 code of decimal 2 is 0101, its 1’s complement is 1010 which is
excess – 3 code for decimal 7, which is 9’s complementing of 2. The self complementing property of this
code helps considerably in performing subtraction operation in digital systems. Excess – 3 codes for
decimal digits 0 through 9 are given in table.
Gray code:
It is very useful code in which a decimal number is represented in binary form in such a way so that each
Gray code number differs from the preceding and the succeeding number by a single bit. For example, the
Gray code for decimal number 5 is 0111 and for 6 is 0101. These two codes differ by only one bit position
(third from the left). This code is used extensively for shaft encoders because of this property. It is not a
weighted code. The Gray code is a reflected code and can be constructed using this property as given
below.
i) A 1 – bit Gray code has two code words 0 and 1 representing decimal numbers 0 and 1 respectively.
ii) An n – bit (n 2) Gray code will have first 2n – 1 Gray code of (n – 1) bits written in order with a leading 0
appended.
iii) The last 2n – 1 Gray code will be equal to the Gray code words of an (n – 1) – bit Gray code, written in
reverse order (assuming a mirror placed between first 2n – 1 and last 2n – 1 Gray codes) with a leading 1
appended.
Question:
Determine (a) 1 – bit (b) 2 – bit (c) 3 – bit Gray codes and tabulate along with their equivalent decimal
number.
Answer:
a) 1 – bit gray code is constructed using (i) above
Decimal number Gray code
0 0
1 1
b) 2 – bit gray code is constructed using (ii) and (iii) above and gray code of 1 – bit
Decimal number Gray code
0 00
1 01
2 11
3 10
c) 3 – bit gray code is constructed using 2 – bit gray code
Decimal number Gray code
0 000
1 001
2 011
3 010
4 110
5 111
6 101
7 100
Octal code:
It is a 3 – bit binary code, in which each of the octal digits 0 through 7 is coded into 3 – bit straight binary
number. For example, code for octal digit 4 is 100. Using this code, octal numbers can be coded into
straight binary form or the binary numbers can be represented by octal numbers as discussed.
22
This code is used for binary inputs in digital computers, microprocessor etc.
Page
Hexadecimal code:
It is a 4 – bit binary code used for input/output in digital computer microprocessors etc.
Question:
Represent the decimal number 27 in binary form using
i) Binary code iii) Excess – 3 code v) Octal code
ii) BCD code iv) Gray code vi) Hexadecimal code
Solution:
i) The decimal number is converted into straight binary form. Its value is 11011
ii) Each digit of the decimal number is code using 4 – bit BCD code as given below.
0010 0111
iii) Each digit of the decimal number is coded using 4 – bit excess – 3 code as given below
0101 1010
iv) 5 bit are required to represent 27, therefore, 5 – bit Gray code is constructed and 27 is represented as
10110
v) (27)10 = (33)8 = 011 011
vi) (27)10 = (1B)16 = 0001 1011
Question:
Represent the decimal number (a) 396 and (b) 4096 in binary form in
i) Binary code (straight ii) BCD code iv) Octal code
binary) iii) Excess – 3 code v) Hex code
Answer:
a)
i) 396 = 110001100
ii) 396 = 001110010110
iii) 396 = 011011001001
iv) 396 = (614)8 = 110001100
v) 396 = (18C)16 = 000110001100
b)
i) 4096 = 1000000000000
ii) 4096 = 0100000010010110
iii) 4096 = (10000)8 = 001 000 000 000 000
iv) 4096 = (1000)16 = 0001 0000 0000 0000
Alphanumeric code:
Table:
Some alphanumeric codes:
Character 6 – bit Internal code 8 – bit EBCDIC code 12 – bit Hollerith code
A 010001 11000001 12, 1
B 010010 11000010 12, 2
C 010011 11000011 12, 3
D 010100 11000100 12, 4
E 010101 11000101 12, 5
F 010110 11000110 12, 6
G 010111 11000111 12, 7
H 011000 11001000 12, 8
I 011001 11001001 12, 9
J 100001 11010001 11, 1
K 100010 11010010 11, 2
23
Question:
(3527)8 is equivalent to (DRDO 2008)
a) (757)16 c) (131113)4
b) (1879)10 d) All of these
Question:
The number of digits in octal system is (DMRC JE)
24
a) 8 c) 10
Page
b) 7 d) None
Question:
The number of digits in Hexadecimal system is (DMRC JE)
a) 15 c) 16
b) 17 d) 8
Ans. c
Question:
Which of the following binary numbers is equivalent to decimal 10 (DMRC JE)
a) 1000 c) 1010
b) 1100 d) 1001
Ans. c
Question:
The number FF in Hexadecimal system is equivalent to _____ in decimal system (DMRC JE)
a) 256 c) 240
b) 255 d) 239
Ans. b
Question:
The total number of Boolean functions that can be constructed for n Boolean variables is (DRDO 2008)
a) n c) (2n)n
n
b) 2n d) 2(2 )
Ans. b
25
Page
CHAPTER – 3
Digital Logic Families:
Bipolar Logic Families:
The main elements of a bipolar IC are resistors, diodes (which are also capacitors) and transistors. Basically,
there are two types of operations in bipolar ICs:
1. Saturated, and
2. Non – Saturated
In saturated logic, the transistors in the IC are driven to saturation, whereas in the case of non –
saturated logic, the transistors are not driven into saturation.
The saturated bipolar logic families are:
1. Resistor – transistor logic (RTL)
2. Direct – coupled transistor logic (DCTL)
3. Integrated – injection logic (I2L)
4. Diode – transistor logic (DTL)
5. High – threshold logic (HTL), and
6. Transistor – transistor logic (TTL)
The non – saturated bipolar logic families are:
1. Schottky TTL, and
2. Emitter – coupled logic (ECL)
Speed of operation:
Page
The speed of a digital circuit is specified in terms of the propagation delay time. The input and output
waveforms of a logic gate are shown in Figure. The delay times are measured between the 50 percent
voltage levels of input and output waveforms. There are two delay times: t pHL, when the output goes from
the HIGH state to LOW state and tpLH, corresponding to the output making a transition from the LOW state
to HIGH state. The propagation delay time of the logic gate is taken as the average of these two delay
times.
Power Dissipation:
This is the amount of power dissipated in an IC. It is determine by the current, I CC that it draws from the VCC
supply, and is given by VCC X ICC. ICC is the average value of ICC (0) and ICC (I). This power is specified in
milliwatts.
Figure of Merit:
The figure of merit of a digital IC is defined as the product of speed and power. The speed is specified in
terms of propagation delay time expressed in nanoseconds.
Figure of merit = propagation delay time (ns) X power (mW)
It is specified in pico joules (ns X mW = pJ)
A low value of speed power product is desirable. In a digital circuit, if it is desired to have high speed i.e.
low propagation delay, then there is a corresponding increases in the power dissipation and vice – versa.
Fan out:
This the number of similar gates which can be driven by a gate. High fan out is advantageous because it
reduces the need for additional drivers to drive more gates.
Noise Immunity:
The input and output voltage levels defined above are shown in figure. Stray electric and magnetic fields
Page
may induce unwanted voltages, known as noise, on the connecting wires between logic circuits. This may
cause the voltage at the input to a logic circuit to drop below V IH or rise above VIL and may produce
undesired operation. The circuit’s ability to tolerate noise signals is referred to as noise immunity a
quantitative measure of which is called noise margin.
Operating temperature:
The temperature range in which an IC functions properly must be known. The accepted temperature
ranges are: 0 to + 700C for consumer and industrial applications and – 550C to + 1250C for military purpose.
OR
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
NAND
AB Q1 Q2 Y
00 N N 1
01 N Y 1
10 Y N 1
11 Y Y 0
NOR
AB Q1 Q2 Y
00 N N 1
01 N Y 0
10 Y N 0
11 Y Y 0
Current Hagging:
Because of different saturation levels of loading gates, current will be blocked or hogged in certain loads
only and certain loads are in the saturation of current known as current hogging problem.
N – MOS
N – MOS Gate (+)ve ON ( ve)
Gate ()ve OFF
NOT
A n1 n2 Y
0 Y N 1
1 Y Y 0
NAND
A B n1 n2 n3 Y
00 Y N N 1
01 Y N Y 1
10 Y Y N 1
11 Y Y Y 0
29
NOR
Page
AB n1 n2 n3 Y
00 Y N N 1
01 Y N Y 0
10 Y Y N 0
11 Y Y Y 0
P – MOS
P – MOS Gate (+)ve OFF
Gate ()ve ON
NOT
A P1 P2 Y
0 Y Y (GND) 1
0 Y N ( VDD) 0
NOR
Shortcut is opposite to N – MOS
A B P1 P2 P3 Y
00 Y Y Y 1 GND
01 Y Y N 0 VDD
10 Y N Y 0 VDD
11 Y N N 0 VDD
NAND
A B P1 P2 P3 Y
00 Y Y Y 1
01 Y Y N 1
10 Y N Y 1
11 Y N N 0
C – MOS
NOT
A P n Y
0 Y N 1 VDD
1 N Y 0 GND
NAND
Use shortcut seeing N – MOS column multiplication AND operation
A B P1 P2 n1 n2 Y
00 Y Y N N 1 VDD
01 Y Y N Y 1 VDD
10 N Y Y N 1 VDD
11 N N Y Y 0 GND
NOR
30
A B P1 P2 n1 n2 Y
Page
00 Y Y N N 1 VDD
01 Y Y N Y 0 GND
10 N Y Y N 0 GND
11 N N Y Y 0 GND
DTL
NAND
= D1 + D2 + VBE (SAT)
= 0.7 + 0.7 + 0.7 = 2.1
= 0.7 + 0.7 + 0.8 (sat) = 2.2V
Given:
VY = 0.7V
VBE (ON) = 0.7V
VBE (Sat) = 0.8V, = 25
VCE (Sat) = 0.1V
Case (i):
Vx = 0.1V, Vy = 0.1V
VCC − V1 5−0.8
4= = = 1.05mA
R1 4K
i2 = i B = i R = 0
Q is cutoff
Y = High (5V)
Case (ii):
Vx = 0.1V, Vy = 5V
Same as that of (i)
Y = high (5V)
Case (iii):
Vx = 5V, Vy = 0.1V
Same as that of case (i) and Case (ii)
Y = High (5V)
Saturation condition:
i′c
iB
1.22+(1.05)
25
0.62
N = 13.7
N 13
Case (ii): Output of the driving gate is high
In this case, input diode of the loading gate is reverse biased and there exist a reverse saturation current
which passes through RC of driving gate from + VCC. By N number of loads, we get much voltage drop across
RC and output alters from high value which lead to improper operation so even in this case also there is a
limit on fan out.
Note:
Among the above two cases the least value should be taken for the overall fan out. So, the output low case
is preferable.
TTL:
NAND NOT
The purpose of D1: It avoids the ringing problem. The negative voltage fluctuations can be grounded by D 1
and the input transistor will be safe.
The purpose of D2: It is used for the proper switching voltages at the output.
TTL Technologies are three types.
1) Totem pole TTL: In this case, output transistors are not ON simultaneously. The above discussed
example is totem pole TTL only.
2) Open collector TTL: In this case, the collector section of output transistor and a pull up resistor is used
for proper switching output.
Note:
Pull up resistor also avoids voltage fluctuations of power supply.
Open collector TTL allows wired logic.
Wired Logic:
Wired AND Logic Wired OR Logic
3) Tristate logic:
In the case of tristated logic, there will be 3 states, logic 0, logic 1 and high impedance state.
IOH
Fan out =
IIH
Page
Question:
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
Design f = AB + C (D + E)
Using NMOS Using PMOS
Using CMOS
Consider both NMOS & PMOS circuit
Above figure shows the K – maps for two, three and four variables. In an n – variable K – map there are 2n
cells. Each cell corresponds to one of the combination of n variables, since there are 2 n combinations of n
variables. Therefore, we see that for each row of truth table, for each minterm and for each Maxterm
there is one specific cell in the K – map. The variables have been designated as A, B, C and D and the binary
numbers formed by them are taken as AB, ABC, and ABCD for two, three, and four variables respectively.
In each map the variables and all possible values of the variables are indicated (the first bit corresponds to
the first variable and the second bit corresponds to the second variable) to identify the cells. Gray code has
been used for the identification of cells. The reason for using Gray code will become clear when we discuss
the application of K – map. You can verify the decimal number corresponds to each cell which is written in
the top left corner of the cell as shown in Figure.
Figure shown the minterm/Maxterm corresponding to each cell and the term is written inside the cell for
clear understanding.
Table (3):
Truth table of a 3 – variable function
Row number Inputs Output
A B C Y
0 0 0 0 0
1 0 0 1 1
2 0 1 0 1
3 0 1 1 0
4 1 0 0 1
5 1 0 1 0
6 1 1 0 0
7 1 1 1 1
Question:
Prepare the truth table for K – map of figure
Solution:
The truth table is given in table
Note that the 0’s are not written in the K – map of Figure. Actually, we need enter either 0’s and 1’s only in
the K – map. If only 1’s are entered the empty cells are 0’s and if only 0’s are entered then the empty cells
are 1’s.
Question:
35
Table 4:
Truth table for K – map of figure
Row number Inputs Output
A B C D Y
0 0 0 0 0 1
1 0 0 0 1 0
2 0 0 1 0 0
3 0 0 1 1 0
4 0 1 0 0 0
5 0 1 0 1 1
6 0 1 1 0 0
7 0 1 1 1 1
8 1 0 0 0 0
9 1 0 0 1 1
10 1 0 1 0 0
11 1 0 1 1 0
12 1 1 0 0 1
13 1 1 0 1 0
14 1 1 1 0 1
15 1 1 1 1 1
Question:
Represent equation (14) on K – map
Solution:
Corresponding to each minterm in the equation, there is a cell in the K – map and a 1 is entered in each
one of these cells. The K – map will be as shown in figure.
Similarly, from the K – map, we can write the corresponding logical equation in standard SOP from by
ORing ht minterms corresponding to each 1 entry in the K – map.
Question:
Write the logical equation in the standard SOP form for the K – map of figure above.
Solution:
Y=A ̅B
̅C̅D
̅ + ABC̅D̅+ A ̅BC̅D̅ + AB̅C̅D + A̅BCD + ABCD + ABCD ̅
= m(0, 5, 7, 9, 12, 14, 15) 16
If the equation is in SOP form, it can be converted to standard SOP form by using the method discussed
earlier and then it can be represented on K – map. Another method of representing SOP form on K – map
without converting it to standard SOP form will become clear from the discussion of following sections.
Question:
Page
Question:
Write the logical equation in the standard POS from for the K – map of figure.
Solution:
̅ ) (A + B + C̅ + D) (A + B + C̅ + D
Y = (A + B + C + D ̅)
̅ + C + D) (A + B
(A + B ̅ + C̅ + D) (A ̅ + B + C + D)
̅ + B + C̅ + D) (A
(A ̅ + B + C̅ + D ̅+B
̅ ) (A ̅+C+D ̅)
= M (1, 2, 3, 4, 6, 8, 10, 11, 13) 17
If the equation is in POS form, it can be converted into standard POS form by the method discussed earlier
and then it can be represented on K – map. Another method of representing POS form on K – map without
converting it to standard POS form will become clear from the discussion of next sections.
Equation (16) represents the K – map of figure in standard SOP form and equation (17) represents the
same K – map in standard POs form. Therefore, these two equations are equivalent. Alternatively stated,
an equation in SOP form can be converted into an equivalent POS form and vice – versa.
5 1, 4, 7 1, 4, 7, 13
6 2, 4, 7 2, 4, 7, 14
Page
7 3, 5, 6 3, 5, 6, 15
8 0, 9, 10, 12
9 1, 8, 11, 13
10 2, 8, 11, 14
11 3, 9, 10, 15
12 4, 8, 13, 14
13 5, 9, 12, 15
14 6, 10, 12, 15
15 7, 11, 13, 14
Question:
Simplify the K – map of figure
Solution:
The standard SOP form of equation can be written by inspection as
Y=A ̅B̅C̅ + A
̅BC + ABC + AB ̅C̅ 18
If we combine the ones in adjacent cells (0, 4) and (3, 7) equation (18) can be written as
Y = (A̅ + A) B
̅C̅ + (A
̅ + A)BC 19
̅ ̅
= BC + BC 20
Equation (20) can be directly obtained from the K – map by using the following procedure:
1. Identify adjacent ones, then see the values of the variables associated with these cells. Only one
variable will be different and gets eliminated. Other variables will appear in ANDed form in the term, it
will be in the uncomplemented for if it is 1 and in the complemented form if it is 0.
2. Determine the term corresponding to each group of adjacent ones. These terms are ORed to get the
simplified equation in SOP form.
Table 6:
Groups of four adjacent ones in a 3 – variable K – map
Cell with decimal number Decimal numbers of cells forming groups of adjacent fours
0 (0, 2, 6, 4), (0, 1, 2, 3), (0, 1, 4, 5)
1 (1, 0, 2, 3), (1, 3, 7, 5), (1, 0, 4, 5)
2 (2, 0, 6, 4), (2, 3, 1, 0), (2, 3, 6, 7)
3 (3, 1, 7, 5), (3, 2, 1, 0), (3, 2, 6, 7)
4 (4, 6, 2, 0), (4, 5, 6, 7), (4, 5, 0, 1)
5 (5, 1, 3, 7), (5, 4, 6, 7), (5, 4, 0, 1)
6 (6, 0, 2, 4), (6, 7, 4, 5), (6, 7, 2, 3)
38
Question:
Simplify the K – map of figure
Solution:
The standard SOP form of equation can be written by inspection as
Y = m0 + m1 + m3 + m7 + m8 + m9 + m11 + m15
= (m0 + m1 + m8 + m9) + (m3 + m7 + m15 + m11) 21
In the K – map of figure, there are two groups of four adjacent ones. One corresponding to cells 0, 1, 8 and
9 and the other one corresponding to 3, 7, 15 and 11
In equation 21, the minterms corresponding to each group are combined. The first term can be written as
m0 + m1 +m8 + m9 = A ̅B
̅ C̅D
̅+ A ̅B
̅ C̅D + AB
̅ C̅D + AB̅ C̅D ̅ C̅D
̅ + AB
̅ ̅ ̅ ̅ ̅
= BC (AD + AD + AD + AD)̅
= B̅C̅ [A
̅ (D̅ + D) + A(D ̅ + D)]
= B̅C̅ [A
̅ . 1 + A. 1]
= B̅C̅ [A
̅ + A] = B ̅C̅. 1 = B ̅C̅
In the first term of equation (21) we observe the following
1. In this group of four minterms, two of the variables appear as B ̅ and C̅ in all the four terms.
2. The variable A appears as A in two and as A ̅ in the other two minterms.
3. The variable D appears as D in two and as D ̅ in the other two minterms.
4. The combination of these four minterms results in one term with two literals which are present in all
the four terms. Similarly, the second term of equation (21) is simplified to CD. Therefore, the K – map is
simplified to
Y=B ̅C̅ + CD
Table 7:
Groups of eight adjacent ones in 4 – variable K – map
Decimal numbers of cells forming groups of
adjacent eights in a 4 – variable K – map
0, 4, 12, 8, 1, 5, 13, 9
0, 4, 12, 8, 2, 6, 14, 10
0, 1, 3, 2, 4, 5, 7, 6
0, 1, 3, 2, 8, 9, 11, 10
1, 5, 13, 9, 3, 7, 15, 11
39
The above algorithm will be used to minimize the logical functions in the examples given.
Page
Question:
Minimize the four variable logic function using K – map
f(A, B, C, D) = m(0, 1, 2, 3, 5, 7, 8, 9, 11, 14) 23
Solution:
The K – map of equation (23) id shown in figure. The equation is minimized in the following steps:
1. Encircle 1 in cell 14 which cannot be combined with any other 1. The term corresponding to this is
ABCD ̅.
2. There are at least two possible ways for every 1 forming groups of two adjacent ones. Therefore, we
ignore it for the time being and go to the next step.
3. There is only one possible group of four adjacent one involving each of the cells 8, 11, 5 or 7 and 2, and
these are (8, 9, 0, 1), (11, 9, 1, 3), (5, 7, 3, 1) and (2, 3, 1, 0) respectively. Encircle these groups. The
terms corresponding to these groups are B ̅C̅, B ̅D and A
̅D, A ̅B̅, respectively.
Since all the ones have been encircled, therefore the minimized equation is
̅+B
f (A, B, C, D) = ABCD ̅C̅ + B
̅D + A ̅D + A ̅B̅ 24
Question:
Determine the minimized expression in SOP form for the truth table given in table 8
Solution:
The K – map for the truth table of table 8 is shown in figure. Using the minimization steps, we obtain the
minimized expression
Y=B̅ + AC̅ + A
̅ CD 25
Table 8
Inputs Output
A B C D Y
0 0 0 0 1
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 0
1 1 1 1 0
41
Page
Minimization of POS form:
For minimizing a given expression in POS form or for a given truth table we write zeros in the cells
corresponding to max terms for 0 outputs. The K – map is simplified by following the same procedure as
used for SOP form with ones replaced by zeros. In this groups of zeros are formed rather than groups of
ones. We shall minimize the above two examples in POS form.
Question:
Minimize the logic function of equation (23) in POS form.
Solution:
Equation (23) can be expressed in standard POS from as
f(A, B, C, D) = M (4, 6, 10, 12, 13, 15) 26
The K – map corresponding to equation (26) is shown in figure. Note that the K – map can also be obtained
directly from equation (23).
Using steps similar to those outlined for SOP form, we obtain the minimized expression.
̅ + B + C̅ + D).( A
f = (A ̅+B
̅+D ̅ ).(A + B
̅ + D) 27
If we compare equation (24) and (27), we observe that the number of terms are not same in the two
minimizations. In fact, in general the two minimizations will not have the same number of terms and will
require different quantities of hardware. Therefore, one can obtain both minimizations and select the one
which requires minimum hardware. Inn some situations there not be any choice to be designer because of
non – availability of certain ICs.
Question:
Minimize the truth table give in table 8 using maxterms.
Solution:
The K – map is given in figure
Inputs Output
A B C D Y
0 0 0 0 0
0 0 0 1 1
0 0 1 0 1
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1
0 1 1 1 0
1 0 0 0 0
1 0 0 1 1
1 0 1 0 X
1 0 1 1 X
1 1 0 0 X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X
CHAPTER – 5
Design Examples:
Arithmetic Circuits:
1. Half adder:
Truth table of an half adder
Inputs Output
A B S C
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
From the truth table, we obtain the logical expressions for S and C outputs as
S=A ̅=AB
̅B + AB
C = AB
The realization of an half adder using gates is shown in figure.
43
Page
2. Full adder:
Truth table for a full adder
Inputs Outputs
An Bn Cn – 1 Sn Cn
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
The K – maps for the outputs Sn and Cn are given in figure and the minimized expressions are given by
Sn = ̅̅̅̅ ̅̅̅̅̅̅
An Bn C ̅̅̅̅ ̅̅̅̅̅̅
n−1 + An Bn Cn−1 + An Bn Cn−1
Cn = An Bn + Bn Cn−1 + An Cn−1
Sn = ̅̅̅̅ ̅̅̅̅̅̅
An Bn C ̅̅̅̅ ̅̅̅̅ ̅̅̅̅ ̅̅̅̅̅̅
n−1 + An Bn Cn−1 + An Bn Cn−1 + An Bn Cn−1
Cn = AnBn + BnCn – 1 + AnCn – 1
The NAND – NAND realization are given in figure
3. Half subtractor
Table:
Inputs Outputs
A B D C
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
From the truth table, the logical expression for D and C are obtained as
D=A ̅B + AB ̅=AB
C=A ̅B
44
a=B ̅D ̅ + BD + CD + A
b = B + C̅ D
̅ ̅ + CD
c = B + C̅ + D = ̅̅̅̅̅̅
̅CD
B ̅
d = B D + C D + B C + BC̅D
̅ ̅ ̅ ̅
e=B ̅D ̅+CD ̅
f = A + C̅ D
̅ + BC̅ + BD ̅
g = A + BC̅ + B̅C + CD ̅
Truth table:
Truth table of BCD to 7 segment decoder
Decimal digit displayed Inputs Outputs
A B C D a b c d e f g
0 0 0 0 0 1 1 1 1 1 1 0
1 0 0 0 1 0 1 1 0 0 0 0
2 0 0 1 0 1 1 0 1 1 0 1
3 0 0 1 1 1 1 1 1 0 0 1
4 0 1 0 0 0 1 1 0 0 1 1
5 0 1 0 1 1 0 1 1 0 1 1
45
6 0 1 1 0 0 0 1 1 1 1 1
Page
7 0 1 1 1 1 1 1 0 0 0 0
8 1 0 0 0 1 1 1 1 1 1 1
9 1 0 0 1 1 1 1 0 0 1 1
Question:
Design a binary to Gray code converter.
Answer:
The truth table of binary to gray code converter is given in table. Or each of four outputs, K – maps are
prepared and simplified. The K –maps are prepared and simplified. The K – maps are given in figure and the
simplified expressions are given by equation. The circuit is given,
46
G3 = B3
G2 = B2 B3
Page
G1 = B1 B2
G0= B0 B1
Question:
Design a gray to binary code converter
Solution:
The truth table for this is given in table. The K – maps are given in figure and the simplest expressions are
given by equation
Question:
Simplify the six variable logic expression.
f (A, B, C, D, E, F) = m (0, 5, 7, 8, 9, 12, 13, 23, 24, 25, 28, 29, 37, 40, 42, 44, 46, 55, 56, 57, 60, 61)
Answer:
The K – map of above equation shown in figure and the simplified expression is
F=A ̅B ̅D̅E ̅ F̅ + A̅B̅ C̅ DF + BC̅DE ̅F + BC̅DEF + AB ̅ CF̅ + A̅CE ̅ + BCE ̅
Above equation can be realized using NAND – NAND configuration.
47
Page
Multiplexers and their use in combinational logic design:
Multiplexer:
The multiplexer is a special combinational circuit that is one of the most widely used standard circuits in
digital design. The multiplexer (or data selector) is a logic circuit that gates one out of several to a single
output. The input selected is controlled by a set of select inputs. Figure shows the block diagram of a
multiplexer with n input lines and one output line. For selecting one out of n inputs for connection to the
output, a set of m select inputs is required where 2m = n. Depending upon the digital code applied at the
select inputs one out of n data sources is selected and transmitted to a single output channel. Normally, a
strobe (or enable) input (G) is incorporated which helps in cascading and it is generally active low, which
means it performs its intended operation when it is LOW.
Table:
Truth table of a 4:1multiplexer
Select inputs Output
S1 S0 Y
0 0 I0
0 1 I1
1 0 I2
1 1 I3
Above table gives the truth table of a 4:1 multiplexer. With LOW input at G, the output Y can be expressed
as
Y = S̅1 ̅̅̅
S0 I0 + S̅1 S0 I1 + S1 ̅̅̅
S0 I2 + S1 S0 I3 1
Equation (1) can be realized using NAND gates and the realization is given in figure.
Combinational logic design using multiplexers:
The multiplexing function discussed above can conventionally be used as a logic element in the design of
combinational circuits. Standard ICs are available for 2:1, 4:1, 8:1, 16:1 multiplexers.
Table:
Available multiplexer ICs
IC Number Description Output
74157 Quad 2:1 Multiplexer Same as output
74158 Quad 2:1 Multiplexer Inverted input
74153 Dual 4:1 Multiplexer Same as input
74152 Dual 4:1 Multiplexer Inverted input
48
Question:
Realize the logic function of the truth table given in table
Inputs Output
A B C D Y
0 0 0 0 0
0 0 0 1 0
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
0 1 0 1 0
0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 1
1 0 1 0 1
1 0 1 1 1
1 1 0 0 1
1 1 0 1 0
1 1 1 0 0
49
1 1 1 1 1
Page
Table:
Inputs Output
A B C Y
0 0 0 0
0 0 1 ̅
D
0 1 0 ̅
D
0 1 1 1
1 0 0 D
1 0 1 1
1 1 0 ̅
D
1 1 1 ̅
D
The second method can also be used if the logic expression is specified.
Multiplexer tree:
Since 16 – to – 1 multiplexers are largest available ICs. Therefore, to meet the larger input needs there
should be a provision for expansion. This is achieved with the help of enable/strobe inputs and multiplexes
stacks or trees are designed. Two commonly used methods for this purpose are illustrated in figures.
These two general techniques can be used to expand to an n input multiplexer without any difficulty.
Table:
Available Demultilexer ICs
IC Number Description Output
74139 Dual 1:4 Demultiplexer Inverted input
(2 – line to 4 – line decoder)
74155 Dual 1:4 Demultiplexer 1Y – Inverted input
(2 – line to 4 – line decoder) 2Y – Same as input
74156 Do Open collector
1Y – Inverted input
2Y – Same as input
74138 1:8 Demultilexer Inverted input
(3 – line to 8 – line decoder)
74154 1:16 Demultilexer Same as input
(4 – line to 16 – line decoder)
74159 Do Same as input
Open collector
Question:
Implement the following multi – output combinational logic circuit using a 4 – to – 16 line decoder.
F1 = m (1, 2, 4, 7, 8, 11, 12, 13)
F2 = m (2, 3, 9, 11)
F3 = m (10, 12, 13, 14)
F4 = m (2, 4, 8)
Answer:
51
Page
The four bit input ABCD is applied at the select input terminals S 3, S2, S1 and S0. The output F1 is required to
be 1 for require to be 1 for minterms 1, 2, 4, 7, 8, 11, 12 and 13. Therefore, a NAND gate is connected as
shown. Similarly NAND gates are used for the outputs F2, F3 and F4. Here, the decoder’s outputs are active
low. Therefore, a NAND gate is required for every output of the combination circuit.
In the combinational logic design using multiplexer, additional gates are not required, whereas design
using Demultilexer requires additional gates. However even with this disadvantage, the decoder is more
economical in cases where non trivial, multiple – output expressions of the same input variables are
required. In such cases, one multiplexer is required for each output whereas it is likely that only one
decoder will be required, supported with a few gates. Therefore, using a decoder could have advantages
over using a multiplexer.
Demultilexer tree:
Since 4 – line – to – 16 – line decoders are the largest available circuits in ICs, to meet the larger inputs
need there should be provision for expansion. This is made possible by using enable input terminal. Figure
shows a 5 – line – 32 – line decoder and figure shows a 8 – line – to – 256 – line decoder using 4 – line – to
– 16 – line decoders. In a similar way, any m line to n line decoder using 4 – line – to 16 – line decoders. In
a similar way, any m – line – to – n – line decoder can be implemented. However if only a few codes of a
large number need be recognized the alternative approach, such as the one shown in figure can be used.
This is connected to detect the digital number 00011111. The most significant 4 – bits are applied at A B C
D inputs and the least significant bits are 0 0 0 1 and the least – significant bits are 1 1 1 1. The circuit can
be expanded to detect other 8 – bit codes.
52
Page
CHAPTER – 6
Adders and their use as subtractor:
Half and full adders and subtractor for two one – bit binary number have been discussed. Using these
circuits, we can design adders and subtractor for n – bit numbers. However, we can perform both addition
and subtraction using only adders because the problem of subtraction becomes that of an addition when
we use 1’s and 2’s complement representation of negative numbers. Therefore, adders have become
widely used standard circuit available in MSI.
An adder circuit for addition of two n – binary numbers consists of n full adder circuits. It accepts two n –
bit binary numbers as inputs and produces an (n + 1) – bit binary number as the sum. Figure (a) below
shows an adder using full adders and figure (b) below shows its block diagram.
Here, A and B are two n – bit inputs to be added and Cn – 1 Sn – 1 Sn – 2 ……S2 S1 S0 is their sum. In this, a half
adder may be used to add the least significant bits A0 and B0. However, for cascading these adders to
increase the number of bits to be added the CARRY input terminal is required for the adder to add the least
– significant bits. Therefore, all the adders used are full adders, 2 – bit and 4 – bit adder circuits are
available in ICs.
If the n – bit adder is implemented using the scheme of figure (a) above, the carry has to ripple down the
line of cascaded adders from the LSB to MSB position. This decreases the operating speed of the adder and
is limited by the amount of time required to complete the ripple carry operation. Adder ICs are designed to
include a special technique for speeding up the carry generation process known as look – ahead carry. This
technique anticipates the carry bits for each stage before the actual summing operation takes place.
Cascading of adders:
The bit lengths of the number to be added can be increased by cascading the adders. Figure shown an 8 –
bit adder using two 4 – bit adders. In a similar way, we can from an adder tree for making an n – bit adder.
operation produces a number larger than the largest possible number which can be represented by n –
bits. On the other hand, underflow occurs when the result produced is smaller than the smallest number
Page
which can be represented by n – bits. The overflow and underflow logic shown algorithmic. If overflow or
underflow occurs then the result is wrong. This circuit can be converted into an ADDER/SUBTRACTOR
circuit with ADD/SUB control.
BCD Arithmetic:
Quite often, BCD code is used to represent decimal numbers. For example, in the calculator. Therefore
addition and subtraction are required to be performed in BCD code.
BCD Adder:
The 4 – bit binary adder IC (7483) can be used to perform addition of BCD numbers. In this, if the four bit
sum output is not a valid BCD digit, or if a carry C3 is generated, then decimal 6 (0 1 1 0 binary) is to be
added to the sum to get the correct result. Figure shows a 1 – digit BCD adder. BCD adders can be cascaded
to add numbers several digits long by connecting the carry out of a stage to the carry in of the next stage.
BCD Subtractor:
For BCD subtraction, nine’s complement of the subtrahend is added to the minuend. The nine’s
complement of a BCD number is given by nine minus that number. For example, nine’s complement of 7 =
54
9 – 7 = 2. In BCD code we say that the nine complement of 0 1 1 1 is 0 0 1 0. Examples of BCD subtraction
Page
1 Add (EAC)
0111 = +7
c) 4 = 0100
8 = (+) 0001 (nine’s complement of 8)
0101
Nine complement of 0101 = 4
Therefore, the answer is 4
Digital comparators:
Comparators can be designed for comparing multibit numbers. Figure below shows a block diagram of an n
– bit comparator. It receives two n – bit numbers A and B as inputs and outputs are A > B, A = B, and A < B.
Depending upon the relative magnitude of the two numbers, one of the outputs will be HIGH.
Truth table of a 2 – bit comparator
Inputs Outputs
A1 A0 B1 B0 A > B A = B A<B
0 0 0 0 0 1 0
0 0 0 1 0 0 1
0 0 1 0 0 0 1
0 0 1 1 0 0 1
0 1 0 0 1 0 0
55
0 1 0 1 0 1 0
0 1 1 0 0 0 1
Page
0 1 1 1 0 0 1
1 0 0 0 1 0 0
1 0 0 1 1 0 0
1 0 1 0 0 1 0
1 0 1 1 0 0 1
1 1 0 0 1 0 0
1 1 0 1 1 0 0
1 1 1 0 1 0 0
1 1 1 1 0 1 0
Table above gives the truth table of a 2 – bit comparator. Simplify the expressions for A > B, A = B and A <
B outputs using K – map and design the circuit using gates. However, 4 – bit comparators are available in
MSI (7485) which can compare straight binary and natural BCD codes. These ICs can be cascaded to
compare words of greater lengths without external gates. The A > B, A = B, and A < B outputs of a stage
handling less significant bits are connected to the corresponding A > B, A = B, and A < B cascading inputs of
the next stage handling more significant bits. The stage handling the least significant bits musts have A = B
input connected to logic 1 level and A > B and A < B inputs connected to logic 0 or 1 level.
Parity generators/Checkers:
The concept of parity, wherein an additional bit known as the parity – bit is added to a binary word to
make the number of 1’s, in the new work formed, even (even parity) or (odd parity). The circuits of the
generation of parity bits and checking the parity of a given word can be designed using gates. Because of
its wide use, an 8 – bit parity generator/checker circuit has been designed and is available as a MSI chip
(74180).
Figure below gives the block diagram of 74180 in which there are eight parity inputs A through H and two
cascading inputs. There are two outputs EVEN and ODD. Its function table is given in table
56
Page
Table:
Function table of 74180
Parity of inputs A through Cascading inputs Outputs
H EVEN ODD EVEN ODD
EVEN 1 0 1 0
ODD 1 0 0 1
EVEN 0 1 0 1
ODD 0 1 1 0
X 1 1 0 0
X 0 0 1 1
The 74180 can be used as a parity generator as well as parity checker. Its function as a parity checker can
be understood from the function table. Its function as a parity generator is given in table below.
Table:
Function table of 74180 as a 9 – bit parity generator
Parity of inputs A though H Cascading inputs Parity of A through Parity of A through
EVEN ODD H and EVEN H and ODD
ODD 1 0 ODD EVEN
EVEN 1 0 ODD EVEN
ODD 0 1 EVEN ODD
EVEN 0 1 EVEN ODD
57
The cascading inputs must not be equal and the unused parity inputs must be tied to logic 0 level.
Page
Code Converters:
There is a wide variety of binary codes and used in digital systems. Some of these codes are binary coded
decimal (BCD). Excess – 3, Gray, octal, hexadecimal, etc. Often, it is required to convert from one code to
another. For example the input to a digital system may be in natural BCD and the output may be 7 –
segment LEDs. The digital system used may be capable of processing th data in straight binary format.
Therefore, the data has to be converted from BCD to binary at the output.
The BCD output has to be converted to 7 – segment code before it can be used to drive the LEDs. Similarly,
octal and hexadecimal codes are widely used in microprocessor and digital computers as inputs and
outputs. The various code converters can be designed using gates, multiplexers or Demultilexer. However,
there are some MSI ICs available for performing these conversions and are extremely useful in the design
of digital systems. These devices have been discussed below.
The BCD inputs are applied at the input terminals A through E and the LSB of the least significant BCD digit
bypasses the converter and appears as the LSB of the binary output. It accepts two BCD digits – a full digit
D1 C1 B1 A1 and the two least significant bits of a second digit B2 A2. This means that the BCD inputs 00
through 39 can be converted to corresponding binary output by the circuit. Terminals Y 6, Y7 and Y8 are not
used for BCD – to – binary conversion.
Table:
Truth table of 74184 BCD – to – binary converter
BCD Words Inputs Outputs
E D C B A G Y5 Y4 Y3 Y2 Y1
0–1 0 0 0 0 0 0 0 0 0 0 0
2–3 0 0 0 0 1 0 0 0 0 0 1
4–5 0 0 0 1 0 0 0 0 0 1 0
6–7 0 0 0 1 1 0 0 0 0 1 1
8–9 0 0 1 0 0 0 0 0 1 0 0
10 – 11 0 1 0 0 0 0 0 0 1 0 1
12 – 13 0 1 0 0 1 0 0 0 1 1 0
14 – 15 0 1 0 1 0 0 0 0 1 1 1
16 – 17 0 1 0 1 1 0 1 1 0 0 0
18 – 19 0 1 1 0 0 0 1 1 0 0 1
20 – 21 1 0 0 0 0 0 1 1 0 1 0
22 – 23 1 0 0 0 1 0 1 1 0 1 1
24 – 25 1 0 0 1 0 0 1 1 1 0 0
26 – 27 1 0 0 1 1 0 1 1 1 0 1
28 – 29 1 0 1 0 0 0 1 1 1 1 0
58
30 – 31 1 1 0 0 0 0 1 1 1 1 1
32 – 33 1 1 0 0 1 0 0 0 0 0 0
Page
34 – 35 1 1 0 1 0 0 0 0 0 0 1
36 – 37 1 1 0 1 1 0 0 0 0 1 0
38 – 39 1 1 1 0 0 0 0 0 0 1 1
Any X X X X X 1 1 1 1 1 1
These terminals are used to obtain the 9’s complement and the 10’s complement of BCD numbers useful
for BCD arithmetic operations. Figure below gives the block diagram of BCD 9’s complement converter and
table below gives truth table.
Table:
Truth table of 74184 as BCD 9’s complement converter
BCD Word Inputs Outputs BCD 9’s complement
E D C B A G Y8 Y7 Y6 ND NC NB NA
0 0 0 0 0 0 0 1 0 1 1 0 0 1
1 0 0 0 0 1 0 1 0 0 1 0 0 0
2 0 0 0 1 0 0 0 1 1 0 1 1 1
3 0 0 0 1 1 0 0 1 0 0 1 1 0
4 0 0 1 0 0 0 0 1 1 0 1 0 1
5 0 0 1 0 1 0 0 1 0 0 1 0 0
6 0 0 1 1 0 0 0 0 1 0 0 1 1
7 0 0 1 1 1 0 0 0 0 0 0 1 0
8 0 1 0 0 0 0 0 0 1 0 0 0 1
9 0 1 0 0 1 0 0 0 0 0 0 0 0
Any X X X X X 1 1 1 1
BCD input is applied at DCBA input terminal and its 9’s complement appears at N D NC NB NA terminal.
Figure below gives the block diagram of BCD 10’s complement converter and table gives its truth table.
Table:
Truth table of 74184 as BCD 10’s complement converter
BCD Word Inputs Outputs BCD 10’s complement
E D C B A G Y8 Y7 Y6 TD TC TB TA
0 1 0 0 0 0 0 0 0 0 0 0 0 0
1 1 0 0 0 1 0 1 0 0 1 0 0 1
2 1 0 0 1 0 0 1 0 0 1 0 0 0
3 1 0 0 1 1 0 0 1 1 0 1 1 1
4 1 0 1 0 0 0 0 1 1 0 1 1 0
5 1 0 1 0 1 0 0 1 0 0 1 0 1
6 1 0 1 1 0 0 0 1 0 0 1 0 0
7 1 0 1 1 1 0 0 0 1 0 0 1 1
59
8 1 1 0 0 0 0 0 0 1 0 0 1 0
9 1 1 0 0 1 0 0 0 0 0 0 0 1
Page
Any X X X X X 1 1 1 1
The design of circuits for the conversion of 2 or more decades of BCD is quite involved. The circuit for 2
decades of BCD is quite involved. The circuit for 2 – decades BCD – to – binary converter is given in figure
below. The number of 74184 ICs required increases tremendously as the number of input BCD decades
increases. Table gives the number of ICs required for a given number of input BCD decades. From the table
we observe that the circuits become unmanageable for longer BCD words and it may be worthwhile to
examine an alternative approach.
Table:
Number of 74184 ICs required.
Number of
BCD decades 74184 ICs required
2 2
3 6
4 11
5 19
6 28
A read only memory (ROM) may be convenient alternative.
Table:
Truth table of 74185A binary – to – BCD converter
Binary words Inputs Outputs
E D C B A G Y6 Y5 Y4 Y3 Y2 Y1
0–1 0 0 0 0 0 0 0 0 0 0 0 0
2–3 0 0 0 0 1 0 0 0 0 0 0 1
4–5 0 0 0 1 0 0 0 0 0 0 1 0
6–7 0 0 0 1 1 0 0 0 0 0 1 1
8–9 0 0 1 0 0 0 0 0 0 1 0 0
10 – 11 0 0 1 0 1 0 0 0 1 0 0 1
12 – 13 0 0 1 1 0 0 0 0 1 0 0 0
14 – 15 0 0 1 1 1 0 0 0 1 0 1 1
60
16 – 17 0 1 0 0 0 0 0 0 1 0 1 0
18 – 19 0 1 0 0 1 0 0 0 1 1 0 1
Page
20 – 21 0 1 0 1 0 0 0 1 0 0 0 0
22 – 23 0 1 0 1 1 0 0 1 0 0 0 1
24 – 25 0 1 1 0 0 0 0 1 0 0 1 0
26 – 27 0 1 1 0 1 0 0 1 0 0 1 1
28 – 29 0 1 1 1 0 0 0 1 0 1 0 0
30 – 31 0 1 1 1 1 0 0 1 1 0 0 1
32 – 33 1 0 0 0 0 0 0 1 1 0 0 0
34 – 35 1 0 0 0 1 0 0 1 1 0 1 1
36 – 37 1 0 0 1 0 0 0 1 1 0 1 0
38 – 39 1 0 0 1 1 0 0 1 1 1 0 1
40 – 41 1 0 1 0 0 0 1 0 0 0 0 0
42 – 43 1 0 1 0 1 0 1 0 0 0 0 1
44 – 45 1 0 1 1 0 0 1 0 0 0 1 0
46 – 47 1 0 1 1 1 0 1 0 0 0 1 1
48 – 49 1 1 0 0 0 0 1 0 0 1 0 0
50 – 51 1 1 0 0 1 0 1 0 1 0 0 1
52 – 53 1 1 0 1 0 0 1 0 1 0 0 0
54 – 55 1 1 0 1 1 0 1 0 1 0 1 1
56 – 57 1 1 1 0 0 0 1 0 1 0 1 0
58 – 59 1 1 1 0 1 0 1 0 1 1 0 1
60 – 61 1 1 1 1 0 0 1 1 0 0 0 0
62 – 63 1 1 1 1 1 0 1 1 0 0 0 1
All X X X X X 1 1 1 1 1 1 1
The method of expansion to accommodate larger number of binary inputs is quite complicated. The circuit
for conversion of 8 – bit binary number to BCD is given in figure. This requires three ICs. Table gives the
number of ICs required for a given number of input binary bits. Similar to the BCD to binary converters we
may have to resort to ROM for conversion of longer binary words.
Table:
Number of 74185A ICs required
Number of
Binary bits 74185 ICs required
4–6 1
7, 8 3
9 4
10 6
11 7
12 8
13 10
61
14 12
15 14
Page
16 16
Priority Encoders:
Decimal – to – BCD Encoder:
One of the most commonly used input device for a digital system is a set of ten switches, one for each
numeral between 0 and 9. These switches generate 1 or 0 logic levels in response to turning then OFF or
ON. When a particular number is to be fed to the digital circuit in BCD code, the switch corresponding to
that number is pressed. There is an IC available for performing this function (74147) which is a priority
encoder. The block diagram of 74147 IC is given in figure and table gives its truth table. It has active low
inputs and outputs. The meaning of the work priority can be seen from the truth table, for example, if
inputs 2 and 5 are LOW, the output will be corresponding to 5 which has a higher priority than 2, i.e. the
highest numbered input has priority over lower numbered inputs.
Table:
Truth table of 74174
Active low decimal points Active low BCD outputs
1 2 3 4 5 6 7 8 9 D C B A
1 1 1 1 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1 1 1 0
X 0 1 1 1 1 1 1 1 1 1 0 1
X X 0 1 1 1 1 1 1 1 1 0 0
X X X 0 1 1 1 1 1 1 0 1 1
X X X X 0 1 1 1 1 1 0 1 0
X X X X X 0 1 1 1 1 0 0 1
X X X X X X 0 1 1 1 0 0 0
X X X X X X X 0 1 0 1 1 1
X X X X X X X X 0 0 1 1 0
0 X X X X X X 0 1 0 0 1 0 1
0 X X X X X X X 0 0 0 0 0 1
Page
0 1 1 1 1 1 1 1 1 1 1 1 1 0
Its block diagram is given in figure and table gives its truth table. This circuit also have active low inputs and
active low outputs. The enable input and carry outputs, which are also active low, are used to cascade
circuits to handle more inputs. A hexadecimal – to – binary encoder, which is also a microprocessors, etc
can be designed using this facility.
The priority encoders can conveniently be used for handling priority interrupts in computers,
microprocessors etc.
Table:
Available BCD – to decimal decoder/driver ICs
IC No. Output circuit Application
7441 Open collector Nixie tube driver
7442 Totem- pole LED driver
7445 Open collector Indicator/relay driver
74141 Open collector Nixie tube driver
74145 Open collector Indicator/relay driver
74445 Open collector Indicator/relay driver
Question:
Design 16 line multiplexer using two 74151 ICs
Answer:
As there are 16 data lines, 4 selections are required. A is the LSB data select line and D is MSB data select
line. When data select is in the range 0000 to 0111, the D line is 0 which enables the low order MUX
selecting D0 to D7, when the select input lies between 1000 to 1111, the high order multiplexer is selected
allowing D8 to D15 to be selected. The output of the two multiplexers is ORed to get combined output.
63
Page
Question:
Use Multiplexer to implement the functions
Y=A ̅B ̅ C̅ + AB
̅ C̅ + AB
̅C + A̅ BC
Answer:
This is the three variable expression and therefore we need a multiplexer with three selection lines and
eight inputs. We will use 74151 MUX, A 1 must be placed at each data, input that satisfies any turn in
Boolean equation.
Question:
How many inputs and outputs does a full adder have?
a) 3, 2 c) 3, 3
b) 2, 3 d) 2, 2
Ans. d
64
Page
CHAPTER – 7
Flip – Flops:
Block diagram of a sequential circuit:
A block diagram of a sequential circuit is shown in figure above. It consists of combinational circuits which
accept digital signals from external inputs and from outputs of memory elements and generates signals for
external outputs and for inputs to memory elements referred to as excitation.
A memory element is some medium in which one bit of information (1 or 0) can be stored or retained until
necessary, and thereafter its contents can be replaced by a new value. The contents of memory elements
in figure above can be changed by the output of combination circuit which are connected to its input.
The combinational circuit performs certain operations, some of which are used to determine the digital
signals to be stored in memory elements. The other operations are performed on external inputs and
memory outputs to generate the external outputs.
The above process demonstrates the dependence of the external outputs of a sequential circuit on the
external input and the present contents of the memory elements (referred to as the present state of
memory elements). The new contents of the memory elements referred to as the next state; depend on
the external inputs and the present state. Hence the output of a sequential circuit is a function of the time
sequence of inputs and the internal states.
Sequential circuits are classified in two main categories, known as asynchronous and synchronous
sequential circuits depending on timing of their signals.
A sequential circuit whose behaviour depends upon the sequence in which input signals change is referred
to as an asynchronous sequential circuit. The outputs will be affected whenever the input changes. The
commonly used memory elements in these circuits are time delay devices. These can be regarded as
combinational circuits with feedback.
A sequential circuit whose behaviour can be defined from the knowledge of its signal at discrete instant of
time is referred to as a synchronous sequential circuit. In these systems, the memory elements are
affected only at discrete instant of time. the synchronization is achieved by a timing device known as a
systems clock which generates a periodic train of clock pulses as shown in figure. The outputs are affected
only which the application of a clock pulse.
Since the design of asynchronous circuits is more – tedious and difficult, therefore their uses are rather
limited.
Synchronous circuits have gained considerable domination and wide popularity and are also known as
clocked sequential circuits. The memory elements used for FLIP – FLOPs which are capable of storing
binary information.
states and the 0 state. It can be obtained by using NAND or NOR gate. We shall be systematically
developing a FLIP – FLOP circuit starting from the fundamental circuit shown in figure below. It consists of
Page
two inverters G1 and G2 (NAND gates used as inverters). The output of G1 is connected to the input of G2
(A2) and the output of G2 is connected to the input of G1 (A1).
Let us assume the output of G1 to be Q = 1, which is also the input of G2 (A2 = 1). Therefore, the output of
G2 will be Q ̅ = 0 which makes A1 = 0 and consequently Q = 1 which confirms our assumption.
In a similar manner, it can be demonstrated that if Q = 0, then Q ̅ =1 and this is also consistent with the
circuit connections.
From the above discussion we note the following:
1. The output Q and Q ̅ are always complementary.
2. The circuit has two stable states: in one of the stable state Q = 1 which is referred to as the 1 state (or
set state) whereas in the other stable state Q = 0 which is referred to as the 0 state (or reset state).
3. If the circuit is in 1 state, it continues to remain in this state and similarly if it is in 0 state, it continuous
to remain in this state. This property of the circuit is referred to as memory i.e. it can be store 1 – bit of
digital information.
Since this information is locked or latched in this circuit, therefore, this circuit is also referred to as a
latch.
In the latch of figure above, there is no way of entering the desired digital information to be stored in
it. In fact, when the power is switched on, the circuit switches to one of the stable states (Q = 1 or 0)
and it is not possible to predict the state. If we replace the inverters G1 ad G2 with 2 – input NANG
gates, the input terminals of the NAND gates can be used to enter the desired digital information. The
modified circuit is shown in figure below. Two additional inverters G3 and G4 have been added for
reasons which will become clear from the following discussion.
If S = R = 0, the circuit is exactly the same as that of figure. If S = 1 and R = 0, the output of G3 will be 0
and the output of G4 will be 1. Since one of the inputs of G1 is 0, its output will certainly be 1.
Consequently, both the inputs of G2will be 1 giving an output Q ̅ = 0. Hence for this input condition, Q =
1 and Q ̅ = 0. Similarly, if S = 0 and R = 1 then the outputs will be Q = 0 and Q ̅ = 1. The first of these two
input conditions (S = 1, R = 0) makes Q = 1 which is referred to as the set state, whereas the second
input condition (S = 0, R = 1) makes Q = 0 which is referred to as the rest or clear state. This gives us the
means for entering the desired bit in the latch.
Now we see what happen if the input conditions are changed from S = 1, R = 0 to S = R = 0 or from S =
0, R = 1 to S = R = 0. The output remains unaltered. This shows the basic difference between a
combinational circuit and a sequential circuit, even through the sequential circuit is make up of
combination circuits.
The two input terminal are designated as set (S) and reset (R because S =1 brings the circuit in set state
and R =1 brings it to reset or clear state.
If S = R = 1, both the outputs Q and Q̅ will try to become 1 which is not allowed and therefore, this input
66
condition is prohibited.
Page
Clocked S – R Flip – Flop:
It is often required to set or reset the memory cell in synchronism with a train of pulse known as clock
(abbreviated as CK). Such a circuit shown is shown in figure below, and is referred to as clocked set – reset
(S – R) FLIP – FLOP.
Table:
Truth table of S – R Flip – Flop
Inputs Output
Sn Rn Qn + 1
0 0 Qn
1 0 1
0 1 0
1 1 ?
Table:
Summary of operations of S – R FLIP – FLOP
Inputs Output Operation
CK Cr Pr Q performed
1 1 1 Qn + 1 Normal Flip – Flop
0 0 1 0 Clear
0 1 0 1 Preset
J – K Flip – Flop:
The uncertainty in the state of an S – R FLIP – FLOP when Sn = Rn = 1 (fourth row of the truth table) can be
eliminated by converting it into a J – K Flip – Flop. The data inputs are J and K which are ANDed with Q ̅ and
Q, respectively, to obtain S and R inputs i.e.
̅
S = J. Q 1
R = K.Q 2
A J – K Flip – Flop thus obtained is shown in figure below. Its truth table is given in table below which is
reduced to table for convenience. Table has been prepared for all the possible combinations of J and K
inputs, and for each combination both the states of the output have been considered.
67
Page
It is not necessary to use the AND gates of figure above, since the same function can be performed by
adding an extra input terminal to each NAND gate G3 and G4 of figure (Clocked SR flip flop). With the
modification incorporated in figure (SR flip flop with preset and clear), we obtain the J – K Flip – Flop using
NAND gates as shown in figure below. The logic symbol of J – K Flip – Flop is given in figure below.
Table (a):
Truth table for above figure
Data inputs Outputs Inputs to S – R FF Output
Jn Kn Q n Qn Sn Rn Qn + 1
0 0 0 1 0 0 0
0 0 1 0 0 0 1 = Qn
1 0 0 1 1 0 1
1 0 1 0 0 0 1 =1
0 1 0 1 0 0 0
0 1 1 0 0 1 0 =0
1 1 0 1 1 0 1
1 1 1 0 0 1 0 = ̅̅̅̅
Q𝑛
Table (b):
Truth table of J – K FLIP – FLOP
Inputs Output
Jn Kn Q n + 1
0 0 Qn
1 0 1
0 1 0
1 1 ̅̅̅̅
Q𝑛
condition.
Page
The race around condition can be avoided if tp < t < T. However, it may be difficult to satisfy this
inequality because of very small propagation delays in ICs. A more practical method for overcoming this
difficulty is the use of the master – slave (M – S) configuration shown below.
Table:
Truth table of a D – type Flip – Flop
Input Output
Dn Qn + 1
0 0
1 1
Table:
Truth table of T – type Flip – Flop
Input Output
Tn Qn + 1
0 Qn
1 ̅̅̅̅
Qn
69
Page
Conversion from one type of flip flop to another type:
Question:
Convert an S – R FLIP – FLOP to a J – K FLIP – FLOP
Answer:
The excitation tables of S – R and J – K FLIP FLOPs are given in table from which we make the truth table
given in table below.
Present state Next state S – R FF J – K FF T – FF D – FF
Sn Rn Jn Kn T n Dn
0 0 0 X 0 X 0 0
0 1 1 0 1 X 1 1
1 0 0 1 X 1 1 0
1 1 X 0 X 0 0 1
The K – maps are given in figure below, which give
̅
S = J. Q
And,
R = K.Q
Thus, we see that the circuit resulting from the design is the same as that shown in figure.
Row FF data inputs Output S – R FF inputs
J K Q S R
1 0 0 0 0 X
2 0 1 0 0 X
3 1 0 0 1 0
4 1 1 0 1 0
5 0 1 1 0 1
6 1 1 1 0 1
7 0 0 1 X 0
8 1 0 1 X 0
Question:
A 1 MHz clock signal is applied to a J – K Flip Flop with J = K = 1, What is the frequency of the Flip – Flop O/P
signal? (ISRO)
a) 2MHz c) 250kHz
b) 50kHz d) 500 MHz
Ans. b
70
Page
CHAPTER – 8
Counter:
Digital counters are often needed to count events. For example, counting the number of tablets filled in a
vial. Electrical pulses corresponding to the event are produced using a transducer and these pulses are
counted using a counter.
The counters are composed of flip flops. A 3 – counter consisting of three Flip – Flop is shown in figure. A
circuit with n Flip – Flops has 2n possible states. Therefore, the 3 – bit counter can count from decimal 0 to
7.
The Flip – Flops used are 74107J – K master – slave Flip – Flops, used as T – type. The pulses to be counted
are connected at the clock input of FFO. The Q0 output of FFO is connected to the clock input of FF1 and
similarly Q1 is connected to the clock input of FF2.
The FLIP – FLOPs are cleared by applying logic 0 at the clear input terminal momentarily. For normal
counting operation, it is to be maintained at logic 1. The pulses and the output waveforms are illustrated in
figure below.
The output Q0 of the least significant stage changes at the negative edge of each pulse (since T 0 = 1). The
output Q1 changes at the negative edge of each Q0 pulse (since Q0 act as CK for FF1 and T1 = 1) and the
output Q2 changes at the negative edge of each Q1 pulse (since Q1 acts as CK for FF2 and T2 = 1)
At any time, the decimal equivalent of the binary number Q2Q1Q0 is the number of pulses counted till that
time. For example, at X the count is 100 (decimal 4). The circuit resets after counting eight pulses.
At the end of the tenth pulse, Q3 = Q1 = 1, therefore, the output of the NAND gate G will be 0, making the
output of the latch 0. This will reset the counter. The latch is used in order to keep the clear line at 0 till
both the FLIP – FLOPs are cleared.
A counter in which the starting state is not 0 can be designed by making use of the preset inputs of the FLIP
– FLOPs. This is referred to as loading the counter asynchronously (not synchronous with the clock pulse).
This is referred to as a presettable counter.
Synchronous counters:
Question:
Design a 3 – bit synchronous counter using J – K FLIP FLOPs.
72
Answer:
Page
The number of FLIP – FLOPs required is 3. Let the FLIP – FLOPs be FF0, FF1 and FF2 and their inputs and
outputs are given below:
FLIP – FLOP Inputs Output
FF0 J 0, K 0 Q0
FF1 J 1, K 1 Q1
FF2 J 2, K 2 Q2
Transition table:
0 0 0 to 1 1 0 1 1
J0 0 1 X X
K0 X X 1 0
The count sequence and the required inputs of FLIP – FLOPs are given in table. The inputs to the FLIP –
FLOPs are determined in the following manner.
Consider one column of the counter state at a time and start from the first row, for example, consider Q 0.
Before the first pulse is applied, Q0 = 0 and it is required to be 1 at the end of the first clock pulse.
Therefore, to achieve this condition, the values of J0 and K0 are 1 and X respectively (from the excitation
table). These are entered in the table in the row corresponding to 0 pulse. When the second clock pulse is
73
Question:
The SR waveforms shown in figure (b) are applied to SR latch shown in figure (a). Write mode of operation
for each duration and draw the output waveform.
Answer:
i) For time period a S = 1, R = 0, hence mode of operation is set hence Q = 1.
ii) For time period b S = 0, R = 0, Mode of operation is hold. Hence Q = 1
iii) For time duration C S = 0, R = 1. Mode of operation is reset hence output Q = 0
iv) S = 0, R = 0. Mode of operation = hold, therefore Q = 0 for time duration d
Similarly, modes of operation for time periods e, f, g are set, reset and prohibit respectively.
Question:
The S̅ and R
̅ waveforms in figure (a) are applied to the inputs of NAND SR latch as shown in figure (b).
Write mode of operations at different intervals of time.
Answer:
The modes of operations along with the output at different intervals of time are shown in figure.
Question:
The S, R, EN waveforms shown in figure (a) are applied to the inputs of the gated SR latch shown in figure
(b). Write the mode of operation for each time period and draw the output waveform.
Answer:
A high applied on the latch input EN causes enables the circuit and allows it to respond to S, R, inputs.
74
A low on En input disables the circuit which causes the latch to frozen. For the solution see lower part of
Page
figure.
Question:
The D and EN waveforms in figure (b) are applied to the inputs of the data latch or shown in figure (a)
Answer:
The EN data are transferred from the D input to the Q output when the enables pulse is in the high state.
Question:
Determine the output frequency for a frequency division circuit that contains 12 flip – flops with an input
clock frequency ,of 20.48MHz. (DMRC 2016)
a) 10.24kHz c) 30.24kHz
b) 5kHz d) 15kHz
Ans. b
Question:
Which shift register counter requires the most decoding circuitry? (ISRO)
a) Johnson counter c) Ripple counter
b) Ring counter d) MOD counter
Ans. d
Question:
The ripple counters suffers from (JE Signal Telecom)
a) Propagation delays c) Both the above
b) Voltage spikes d) None of the above
Ans. c
75
Page
CHAPTER – 9
A/D and D/A converters:
Digital to Analog Converters:
The analog output voltage V0 of an bit straight binary D/A converter is related to the digital input by the
equation
V0 = K(2nN– 1 bN – 1 + 2N – 2 bN – 2 + . . . . . . . . + 22b2 + 2b1 + b0) 1
Where K is a proportionality factor
bn = 1, if the nth bit of the digital input is 1
= 0, if the nth bit of the digital input is 0
Question:
Find the analog output voltage of a 4 – bit D/A converter for all possible inputs. Assume K = 1
Answer:
From above equation we obtain the output voltage of 4 – bit D/A converter for all are given in table.
There are two types of commonly used D/A converters. These are
1. Weighted resistor D/A converter, and
2. R – 2R ladder D/A converter
Weighted – Resistor D/A converter:
Let us assume an N – bit straight binary input to a resistor network (through digitally controlled electronic
switches) which produces a current I corresponding to logic 1 at the most significant bit, I/2 corresponding
to logic 1 at the least significant bit position. The total current thus produced will be proportional to the
digital input. This input can be converter into a corresponding voltage, by using an OP AMP, which will be
proportional to the digital input.
Digital input Analog circuit
b3 b2 b1 b0 V
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
1 1 0 0 12
1 1 0 1 13
1 1 1 0 14
1 1 1 1 15
The circuit of figure below can be used for converting the digital input to analog output which operates
according to the above principle. This circuit is referred to as a weighted resistor D/A converter since the
resistance values are weighted in accordance with the binary weights.
In the circuit figure, the digital inputs (1 or 0) operate the switches. A switch is thrown to position 1 or 0 for
a digital input corresponding to that bit being 1 or 0, respectively. The voltage applied to a resistor is V(1) if
76
the switch connected to it is in position 1 and V(0) if it is position 0. The current I i is given by
Page
Ii = IN – 1 + IN – 2 + IN – 3 + . . . . . . . . . + I2 + I1+ I0
Where,
IN – 1 = VN – 1 /R
IN – 2 = VN – 2 /2 R Where Vn = V(1) if bn = 1
IN – 3 = VN – 3 /2 R2 = V(0) if bn = 0
I0 = V0/2N – 1 R
For straight binary input, V(0) = 0 and V(1) = VR, and the output voltage V0 is given by
RF RF RF RF
V0 = ( VR) ( bN−1 + bN−2 + bN−3 + . . . . . . . . + b0 )
R 2R 22 R 2N−1 R
RF
Which is of the same form as equation 1 with K = N−1
VR
2 R
The output swings in only one direction and therefore is unipolar. If it is required to convert digital data in
bipolar format such as in sign magnitude. 1’s complement or 2’s complement format, then V(0) 0. In such
cases, V(0) is used to offset the output swing.
With V(1) and V(0) as the voltages applied to the resistor network for 1 and 0, respectively, the output
voltage V0 of figure above is given by
RF
V0 = − N−1
(2N−1 VN−1 + 2N−2 VN−2 + . . . . . . . . . + 21 V1 + 20 V0 )
2 R
An offset can also be produced in the output voltage V 0 by using the circuit. The offset voltage produced in
this circuit is
RF
− . Voff
Roff
From figure (b), we obtain Iin assuming virtual short at the input of the OP AMP.
78
Page
8
VR ( R)
7
Iin = r(8/7R) X 8
R+ (r+8/7R) (r+ R)
7
This current must be 1/16th of the current due to b7, which is VR/R. Therefore,
8
VR ( R) VR
7
8 8 =
R(r+ R)+ r( R) 16R
7 7
Or
r = 8R
With this value of r, it can be verified that the currents due to b2, b1 and b0 will be 1/16th of the currents
due to b6, b5 and b4 respectively.
The output analog voltage V0 of the modified D/A converter of figure for r = 8R is given by
V V V V V V V V
V0 = − ( RR R F b7 + 2RR R F b6 + 4RR R F b5 + 8RR R F b4 + 16R
R R
R F b3 + 32R R
R F b2 + 64R R
R F b1 + 128R R F b0 )
V R
= − ( 2R7 RF ).(27b7 + 26b6 + ………… + 21b1 + b0)
We observe from above equation that the analog output voltage is proportional to the digital input. The
number of resistors in this circuit is less and also the spread in the resistor values is reduced. This
configuration can be used for any number of bits.
An A/D converter using the principal discussed above can be realized, as shown in figure. Here, the
comparator serves the function of the scale, the output of which is used for setting/resetting the bits at
the output of the programmer. This output is converted into equivalent analog voltage from which the
offset voltage is subtracted and then applied to the inverting input terminal of the comparator. It
should be noted that the offset weight was added on the side of the unknown weight and therefore, it
is to be subtracted from the known weight side for getting the equivalent effect. The outputs of the
programmer will change only when the clock equivalent effect. The outputs of the programmer sets
the MSB to 1 and all other bits to zero 0. This is converted into analog signal by the D/A converter and
the comparator compares it with the analog input voltage. If the analog input voltage V a Vi, the
output voltage V0 of the comparator is HIGH which sets the next bits the next bit. Thus, a 1 is tried in
each bit of the D/A converter until the binary equivalent of the analog input voltage is obtained. For an
N – bit converter, the number of clocks pulses required would be N and hence it is slower than the
parallel comparator A/D converter.
counter will be proportional to the frequency of the pulses and hence to the analog voltage.
Page
A voltage to frequency converter is shown in figure. The analog voltage V a is applied to an integrator whose
output is applied at the inverting input terminal of a comparator. The non – inverting of the comparator is
connected to a reference voltage VR. Initially the switch S is open and the voltage v0 decreases linearly
with time (v0 = Vat/), which is shown in figure. When the decreasing v0 reaches Va at t = T, the
comparator output VC goes HIGH. This is used to switch S through a monostable multivibrator. When the
switch S is closed, the capacitor C discharges, thereby returning the integrator output v0 to 0. Since the
pulse width of the waveform VC is very small, a monostable multivibrator is used to keep the switch S
closed for a sufficient time to discharge the capacitor completely. The rate at which the capacitor discharge
upon the resistance of the switch.
Let the pulse width of the monostable mutivibrator be Td. Therefore, the switch S remains closed for Td
after which its opens and v0 starts decreasing again.
If the integration time T >> Td the frequency of the waveforms v0 and vc is given by
1 1 1 Va
f= = =
T+ Td T VR
Thus, we obtain an output waveform whose frequency is proportional to the analog input voltage.
An A/D converter using the voltage to frequency (V/F) converter is shown in figure. The output of the V/F
converter is applied at the clock (CK) input of a counter through an AND gate. The AND gate is enabled for
a fixed time interval T1. The reading of the counter t t = T1 is given by
1 Va
n = fT1 = T1
VR
Which is proportional to Va,
clock pulses will reach the clock (CK) input terminal of the counter. The output of the counter is the digital
output corresponding to Va.
Page
The time T is given by
T= Va
VR
Which shows that T is proportional to Va.
The counter reading is n at t = T, then
fc
n = fc.T = Va
VR
where fc is the clock frequency. The count n is proportional to Va.
Question:
A 5 bit DAC has a current output for a digital input of 10100, an output current of 10mA is produced. What
will Iout be for a digital input of 11101?
Answer:
The digital input 101002 is equal to decimal 20. Since Iout = 10mA for this case, the proportionality factor is
0.5mA. Thus, IOut digital input 111012 = 29 is
Iout = 29 X (0.5) = 14.5mA
Question:
What is the largest value of the output voltage from 8 bit DAC that produces 1.0V for a digital input of
00110010?
Answer:
001100102 = 5010
1.0V = K X 50
Therefore, K = 20mV
The largest output will occur. For an input of 111111112 = 25510
Vout (max) = 20mV X 255 = 5.10V
Question:
A 10 bit DAC has a step size 10mV. Find full scale output voltage and the percentage resolution.
Answer:
85
With 10 bit, there will be 210 – 1 = 1023 steps of 10mV each. The full scale output voltage will therefore be
10mV X 1023 = 10.23V
Page
step size
% resolution = X 100%
full scale output
10mV
Hence, % resolution = X 100% = 0.1%
10.23V
Question:
For an 8 bit counter A/D converter driven by a 1000kHz clock. Find
i) The maximum conversion time
ii) The average conversion time
iii) The maximum conversion rate
Answer:
i) An 8 bit converter has a maximum of 28 = 256. With a 1000kHz clock, the counter advances at the rate
of 1 count each 1sec. To advance 256 count requires 256 X 1 X 10 – 6 = 0.256 m sec.
1
ii) The average conversion time is equal to half of maximum conversion time. thus, it is 2 X 0.256 = 0.128
m sec.
iii) The maximum conversion rate is determined by the longest conversion time since the converter has a
1
maximum conversion time of 0.256 msec, it is capable of making = 3906 conversion per
0.256 X 10−3
second.
Question:
What will happen to the operation of a digital ramp ADC if V in greater than full scale value Vout.
Answer:
It is clear that the output will never go LOW since the stair case voltage can never exceed V in. Thus pulse
will be continuously applied to the counter, so that the counter will repetitively count up from zero to
maximum, recycle back to zero, count up and so on. This will produce repetitive stair case waveforms at
Vout going from zero to full scale, and this will continue until Vin is decreased below dull scale.
Question:
An 8 it SAC has a resolution of 20mV. What will its digital output be for an analog input of 2.17V?
Answer:
2.17
mV = 108.5
20
So that step 108 would produce Vout = 2.16V and step 109 would produce 2.18V, the SAC always produces
a final Vout that is at the step below Vin. Therefore, for the case, Vin = 2.17V, the digital result would be
10810 = 01101102
86
Page
CHAPTER – 10
Semiconductor Memories:
Memory Organization and Operation:
The basic element of a semiconductor memory is a FLIP – FLOP which has been discussed. The information
is stored in binary form. There are a number of locations in a memory chip, each location being meant for
one word of digital information. The number of locations and the number of bits comprising the word vary
from memory to memory. The size of a memory chip is specified by two numbers M and N as M X N bits.
The number M specifies the number of locations available in the memory and N is the number of bits at
each location available in the memory and N is the number of bits at each location. In other words, this
means that M words of N bits each can be stored in the memory. The commonly used values of the
number of words per chip are 64, 26, 512, 1024, 2048, 4096 etc whereas the common values for the word
size are 1, 4 and 8 etc. Memories requiring higher number of words and/on larger word sizes can be
formed by using these chips.
The block diagram of a memory device is shown in figure. Each of the M locations of the memory is defined
by the unique address and therefore, for accessing any one of the M locations, P inputs are required,
where 2P = M. This set of lines is referred to as address inputs or address bus. The address is specified in
the binary form. For convenience, octal and hexadecimal representation are commonly employed.
In fact, the address input is applied to P to M decoder circuit which activates one of its M outputs
depending on the address and thus the desired memory location is selected.
Question:
Consider a memory of size 16 words. Find the binary address of each location.
Answer:
Since M = 16, therefore, 2P = M gives P = 4, i.e for selecting one out of 16 words, a 4 – bit address is
required. The address is specified as A3 A2 A1 A0, where A3 represents the most significant bit (MSB) and A0
represents the least significant bit (LSB) of the address. The address of each location is given.
The number of inputs required to store the data into or read the data from each memory locations is N.
One set of N lines is required for storing the data into the memory referred to as data inputs and another
set of N lines is required for reading the data already stored in the memory, which is referred to as data
outputs. In some memory chips, the same set of the lines is used for data input as well as data output and
is referred to as data bus. This means that the data is time multiplexed. It is used as input for some specific
time and as output for some time. This offers saving in the number of pins on the IC chips.
A number of control inputs are required to give command to the device to perform the desired operation.
For example, a command signal is required to tell the memory whether a write or a read operation is
desired. Other command inputs chip enable (CE), chip select (CS) etc.
Table:
Memory addresses for above question
Word Binary address
Number A3 A2 A1 A0
87
0 0 0 0 0
1 0 0 0 1
Page
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
0 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
In addition to the above mentioned functional pins, a minimum of two pins are required for power supply
and ground. The internal organization of a 16 X 4 memory chip is illustrated in figure. The write and red
operations are discussed.
store half of each word. Figure shows the relevant connections of two chips. Here, we have assumed
bidirectional input/output (I/O) lines which is common in many available memory chips. In this 16 X 8
Page
memory, the higher order four bits (D7, D6, D5, D4) of each 8 – bit word are located in memory M1 and
lower order four bits (D3, D2, D1, D0) are located in memory M0.
Question:
Obtain a 2048 X 8 memory using 256 X 8 memory chips.
Answer:
2048
The number of chips required is 256 = 8. At any one time, only one of the 2048 locations is to be accessed,
which will be in one of the eight chips. That means only one of the eight chips must get selected at a time.
For selecting one out of 2048 locations, the number of address lines required is 11 (211 = 2048). The lower
order eight bits of the address A7 – A0 will be same for each chip, and the higher order three bits of the
address A10 – A8 must select one out of eight chips. For this purpose, a 3 – line to 8 – line decoder is
required. The memory connections are shown in figure. Here, we have assumed a common terminal (R/W ̅)
̅ , whereas logic 0 is to be applied
for read and write. For the read operation, logic 1 is to be applied to R/W
for the write operation. The chip select input is assumed to be active low. The addresses of the chips are
given
89
Page
Table:
Addresses of the memory chips
Memory chip Address (hex.)
M0 000 – 0FF
M1 100 – 1FF
M2 200 – 2FF
M3 300 – 3FF
M4 400 – 4FF
M5 500 – 5FF
M6 600 – 6FF
M7 700 – 7FF
Classification and characteristics of memories:
Various memory devices can be classified on the basis of their principle of operation, physical
characteristics, mode of access, technology used for fabrication etc.
Principle of operation:
Memories can be classified according to their principle of operation. The most commonly used memories
are:
1. Sequential accessed memory 3. Read only memory (ROM)
2. Read and write memory (RAM) 4. Content addressable memory (CAM)
In the sequential accessed memories, the memory locations are accessed, for writing into or reading from,
in a sequential fashion. Therefore, the time required for accessing a memory location (referred to as access
time) for writing into or reading from is different for different location.
There are two types of sequentially accessed memories. These are:
1. Shift registers 2. Charge coupled devices (CCD)
Shift registers can be either static or dynamic. In a static memory, the contents of the memory location do
not change with time as long as power is on. On the other hand, in dynamic memories the information is
stored in MOS capacitors which changes with time and, therefore it ahs to be refreshed at regular
intervals. The dynamic memories are simpler, less expensive require less power, have high packing density
in comparison to static memories, and are therefore widely used in digital systems. However, the cost of
additional circuitry required for refreshing may increase the system cost.
The charge coupled devices are implemented using MOS technology. These devices have high density and
low cost.
The sequentially accessed memories using shift registers and CCD memories.
The other mode of access of a memory location is called as random access in which the access time is same
for each memory location is called as random access in which the access time is same for each memory
location. The read and write memory is a random access memory and is referred to as RAM. RAMs can be
static or dynamic. The detailed operation of RAM.
Read only memory (ROM), as the name suggests, is meant only for reading the information from it. This
does not mean that information is not written into it, because unless some information is stored into it,
there cannot be anything to read from. Actually the process of entering information into this type of
memory is much more complicated than for RAM and is done outside the system where it is used.
Therefore, it is called as read only memory. It is used to store information which is fixed such as tables for
various functions, fixed data and instruction. The ROM is a random access memory.
The various types of read only memories are further sub classified on the basis of the technique employed
for storing information into the memory (referred to as programming) or their erasability properties.
A read only memory is either programmed at the time of manufacturing according to the information
specified by the user (referred to as custom programmed or mask programmed), which cannot be changed
after packaging. Those programmed by the user are referred to as programmable ROM (PPROM). A PROM
90
can be programmed only once after is contents are permanently fixed as ROM.
Another category of PROM is reprogrammable, i.e. it can be programmed again and again. This is referred
Page
ROM Organization:
A read only memory is an array of selectively open and closed unidirectional contacts. The address decoder
is usually divided in two parts for simplifying the decoder design. One half of the address lines are decoded
by one decoder used to energize one of the row lines, whereas the other half of the address lines are
decoded by another decoder used to activate column lines. This method of addressing is referred to as two
dimensional, X – Y, or coincident – selection, addressing. A unidirectional switch is incorporated at the
junction of every row and column.
A 16 – bit ROM array is shown in figure. To select any one of the 16 bits, a 4 – bit address (A3 A2 A1 A0) is
required. The lower order two bits (A1 A0) are decoded by the decoder DL which selects one of the four
rows, whereas the higher order two bits (A3 A2) are decoded by the decoder DH which activates one of the
four column sense amplifier.
The diode matrix is formed by connecting one diode along with a switch between each row and column.
For example, the diode D21 is connected between row 2 and column 1.
The output is enabled by applying logic 1 at the chip select (CS) input.
Programming a ROM means to selectively open and close the switches in series with the diode. For
example, if the switch of the diode D21 is in closed position and if the address input is 0110, row 2 is
activated connecting it to column 1. Also, the sense amplifier of column 1 is enabled which gives logic 1
output if the chip is selected (CS = 1). This shows that a logic 1 is stored at the address 0110. On the other
hand, if the switch of diode D21 is open, logic 0 is stored at the address 0110.
memory location with the same speed. In such memories, the data stored at any location can be changed
Page
during the operation of the system. This type of memory is known as a read/write memory and is usually
referred to as RAM (Random access memory).
The basic storage cell of a RAM is a FLIP – FLOP which simply consists of two cross coupled inverters as
shown in figure. A RAM is an array of these storage cells requiring as many FLIP – FLOPs as the bit storage
capacity of the RAM, which is usually a large number. Therefore, simpler FLIP – FLOP circuits using bipolar
or MOS transistors are used for RAM in order to save silicon chip area, reduce cost, increase speed of
operation and reduce power dissipation.
Bipolar RAMs are static, whereas the MOS RAMs can be static or dynamic. In general, bipolar RAMs are
faster (access time is of the order of a few tens of nanoseconds) and smaller in size (contains 1024 memory
cells or less) than the MOS RAMs, which have access time of the order of a few hundreds of nanoseconds
and storage capacity, upto 64K bits. With improvements in MOS technology, it has become possible to
make MOS RAMs with speeds comparable to those of bipolar RAMs.
Question:
How many memory locations are possible with the address lines
a) 8 b) 12 c) 16
Answer:
a) With 8 address lines there will be total 28 i.e. 256 memory locations from OOH to FFH.
b) With 12 address lines there will be total 212 i.e. 4096 memory locations. The range in Hexadecimal
address will be from OOOH to FFFH.
c) With 16 address lines, there will be 216 i.e. 65536 memory locations. The range in hexadecimal address
will be from OOOH to FFFH.
Question:
a) How many 128 X 8 RAM chips are required to provide a memory capacity of 2048 bytes?
b) How many lines of address bus must be used to access 2048 bytes of memory? How many lines of
these will be common to each chip?
c) How many bits must be decoded for chip select? What is the size of decoder?
Answer:
2048
a) No. of chips required = 128 = 16
b) Address lines for 2048 bytes will be P = log22048 = 11
Thus seven lines will be common
c) The number of lines to be decoded will be 11 – 7 = 4 so the sizes of the decoder will be 4 to 16.
Question:
A microprocessor uses RAM chips of 1024 X 1 capacity
a) How many chips will be required and how many address lines will be connected to provide the capacity
of 1024 bytes?
b) How many chips will be required to obtain a memory of capacity of 16K bytes?
Answer:
a) As only 1024 bytes are required. Hence, the number of RAM chips required will be 8. There are 10
address lines an chip which will be connected together.
b) For 16K bytes of memory, the number of required RAMs will be 16 X 8 i.e. 128. These chips will be
arranged in 16 rows of 8 chips in each row. Hence, there will be different output line and each output
line of the decoder will be connected to the common chip select pin of each row.
93
Page
CHAPTER – 11
Programmable Logic devices:
Various ICs for performing basic digital operations and other functions such as multiplexers, Demultilexer,
adders, comparators, code converters, shift registers and counters etc. These ICs are referred to as fixed
function ICs i.e. each one of them performs a specific, fixed function. These devices are designed by their
manufacturers and are manufactured in large quantities to meet the needs of a wide variety of
applications and are readily available.
To design a circuit a designer can select from the available ICs most appropriate for the circuit, usually
working from a block diagram design concept. The design may have to be modified to meet the special
requirements of these devices. The advantages of this method are:
1. Low development cost,
2. Fast turn around of designs
3. Relatively easy to test the circuits
Some of the disadvantages of this method are:
1. Large board space requirements,
2. Large power requirements
3. Lack of security i.e. the circuits can be copied by others
4. Additional cost, space, power requirements etc required to modify the design or to introduce more
features.
To overcome the disadvantages of design using fixed – function ICs, application specific integrated
circuits (ASICs) are designed by the users to meet the specific requirements of a circuit and are
produced by an IC manufacture (foundry) as per specifications supplied by the users. Usually, the
designs are too complex to be implemented using fixed function ICs.
The advantages of this method are:
1. Reduced space requirement
2. Reduced power requirement
3. If produced in large volumes, the cost is considerably reduced.
4. Large reduction in size through the use of high level of integration
5. Designs implemented in this form are almost impossible to copy.
The disadvantages of this method are:
1. Initial development cost may be enormous
2. Testing methods may have to be developed which may also increase the cost and effort.
Another approach which has the advantages of both the above methods is the use of programmable
logic device (PLDs). A programmable logic device is an IC that is user configurable and is capable of
implementing logic functions. It is an LSI chip contain a ‘regular’ structure and allows the designer to
customize it for any specific application i.e. it is programmed by the user to perform a function
required for his application.
PLDs have the following advantages of fixed function ICs:
i) Short design cycle
ii) Low development cost
The advantages over fixed function ICs are:
i) Reduction in board space requirements
ii) Reduction in power requirements
iii) Design security
iv) Compact circuitry
v) Higher switching speed
PLDs have many of the advantages of ASICs as given below:
94
i) Higher densities
ii) Lower quantity production costs
Page
ROM as a PLD:
A read only memory is basically a combinational circuit and can be used to implement a logic function. A
ROM of size M X N has M number of locations and N number of bits can be stored at each location. The
number of address inputs is PP, where 2P = M and the number of data output lines is N. It can also be
considered as a logic device with P inputs and N outputs as shown in figure.
The 16 – bit ROM array has four inputs and one output, i.e. M = 16, N = 1 and P = 4. The bit pattern stored,
can be considered as truth table with A3 A2 A1 A0 as 4 – bit input and Y as the output which is same as the
bit stored. The logic function corresponding to this is
Y = m (0, 6, 9, 12, 13, 15)
In general, a P variable N outputs logic function can be implemented using a ROM of size 2 P X N since all
the possible 2P minterms are effectively generated as is clear from the above discussion.
If a mask programmable ROM is used, the user can specify the bit pattern to be stored according to the
requirements of the logic function, whereas the user can himself program it in case of PROM, EPROM and
E2PROM. Since programmable ROMs can be used for logic design, therefore, it is also referred to as a
programmable logic device (PLD).
The advantages of using ROM as a programmable logic device are:
1. Ease of design since no simplification or minimization of logic function is required.
2. Design can be changed, modified rapidly
3. It is usually faster than discrete SSI/MSI circuit.
4. Cost is reduced.
There are few disadvantages also of ROM – based circuits, such as non – utilization of complete circuit,
increased power requirement and enormous increase in size with increase in number of input variables
making it impractical.
*---*---*---*---*---*
95
Page