Académique Documents
Professionnel Documents
Culture Documents
J.RAVINDRANADH
Sr.Associate Professor.
E-mail : jrnadh@gmail.com
Textbook
M Morris Mano, Digital Logic and Computer Design, PHI/Pearson Education, 2003.
Reference book
1. Zvi Kohavi, Switching and Finite Automata Theory, 2nd Edition, TMH, 1978.
2. Fundamentals of Logic Design, ch. Roth,Jr
SYLLABUS
Unit -I
Unit -II
SYLLABUS
Unit-III
Cont.,
Unit-IV
IC LOGIC FAMILIES: RTL, DTL, TTL, ECL, MOS, CMOS and IIL families and their comparison.
MSI and LSI: Programmable Logic Arrays, Programmable Array Logic.
Number system
Decimal
Binary
Octal
Hexadecimal
Decimal System :
1. The decimal system is composed of 10 numerals . These 10 symbols are 0,
1, 2, 3, 4, 5, 6, 7, 8, 9.
2. The decimal system is called the base-10 system or Radix-10 because it has
10 digits.
3. The decimal system is clearly most familiar to us because it is a tool that you
used every day.
Example:
Ranks,
Roll Numbers etc.,
EC214
Digital Logic
Design
J Ravindranadh
Sr.Associ.Prof.
Binary System
Octal System
The binary system is simple because it consists of only two digits , i.e. 0 and 1.
The binary system is called the base-2 system or Radix-2 because it has 2 digits.
Use of binary number system in the digital systems.
Hexadecimal system
Conversion Possibilities
Decimal
Octal
Binary
Hexadecimal
Decimal to Binary
Conversion
Converting a decimal number into a binary number is by dividing the decimal
number by 2 progressively, until the quotient of zero is obtained. The binary
number is obtained by taking the remainder after each division in the reverse
order. This method is popularly known as the double-dabble method.
Example: Convert the decimal number 5310 into its binary equivalent.
2 53
2
2
02
2
2
26
--13
--6
--3
--1 --0 ---
1
1
0
1
1
LSB
(53) 10 =
( 110101) 2
EC214 Digital Logic Design
J Ravindranadh
Sr.Associ.Prof.
MSB
Generated Integer
1
0
1
(0.625)10 =(0.101)2
Example: Convert the decimal number (93.8125)10 into its binary equivalent.
2 93
2 46
----- 1
2 23
2 11
----- 0
----- 1
2 5
-----1
2 2
----- 1
----- 0
---- 1
Multiplication
Integer
0.8125x2 =1.625
0.625x2 = 1.25
0.25x2 = 0.5
0.5x2
=1.0
Generated
1
1
0
1
(93.8125)10 =(1011101.1101)2
10
Convert Decimal to
Binary
Generated Integer
1
1
= 1.6
=1.2
0
0
1
1
1
11
Decimal to Octal
Conversion
Example: Convert the decimal number (53.625)10 into its octal
equivalent.
8 53
8 6
0
Multiplication
--- 5
0.625x8=5.000
--- 6
Generated Integer
5
(53.625)10 =(65.5)8
Convert the decimal number (375.3125)10 into its octal equivalent
(567.24)8
Convert the decimal number(444.456)10 into its octal equivalent
(674.35136 )8
12
Decimal to Hexadecimal
Conversion
Example: Convert the decimal number (115.5)10 into its Hexadecimal
equivalent.
16 115
16 7
---
16 0
--- 7
Multiplication
0.5x16=8.000
Generated Integer
8
(115.5)10 =(73.8)16
Convert the decimal number (757.25)10 into its hexadecimal
equivalent
(2F5.4)16
Convert the decimal number (356.89)10 into its hexadecimal
equivalent
(164.E3D7)16
13
Binary to Decimal
Conversion
Example: Convert the binary number (10111.1011)2 into its decimal equivalent.
(10111.1011) 2 = 1 x 20
+ 1 x 21 + 1 x 22 + 0 x 2 3 + 1 x 24 +
14
Converting a binary number to an octal, starting from the least significant bit, each group of 3 bits is replaced by its decimal
equivalents.
Example: Convert the binary number (10011101111.10111)2 into its octal equivalent.
(10011101111.10111) 2 = ( 2357.56)8
15
Binary to Hexadecimal
Conversion
The base of the hexadecimal numbers is 16 and the base for binary numbers is 2. Thus the base for hexadecimal number is the fourth
power of the base for binary number .i.e 2 4 =16.
Converting a binary number to hexadecimal, starting from the least significant bit, each group of 4 bits is replaced by its Hexadecimal
equivalents.
Example: Convert the binary number 10011101111.10111)2 into its hexadecimal equivalent.
(10011101111.10111)2 = ( 4EF.B8)16
16
Octal to Decimal
Conversion
Example: Convert the octal number (475.25)8 into its decimal equivalent.
(475.25)8 = 5 x 80
+ 7 x 81 + 4 x 82 + 2 x 8-1 + 5 x 8-2
17
18
19
Hexadecimal to Decimal
Conversion
Example: Convert the hexadecimal number (9B2.1A)16 into its decimal
equivalent.
(9B2.1A)16 = 2 x 160
20
Hexadecimal to Binary
Conversion
21
Hexadecimal to octal
Conversion
Convert the Hexadecimal number ( 72F. 47 )16 into its octal equivalent.
( 3457.216)8
Convert the Hexadecimal number ( FAC.688 )16 into its octal equivalent.
( 7654.321)8
EC214 Digital Logic Design
J Ravindranadh
Sr.Associ.Prof.
22
Arithmetic Operation
Binary Arithmetic
0+1=1
1+0=1
1+1=10
Example: Add (1010)2 and (1111)2
11
1010
1111
(11001)2
23
Binary addition
24
Binary Subtraction
11001
01110
(01011)2
25
Binary Subtraction
26
Binary Multiplication
100.110
x11.101
100110
000000
100110
100110
100110
10001.001110
100000011012
EC214 Digital Logic Design
J Ravindranadh
Sr.Associ.Prof.
27
Binary Division
11101
101
1000
101
110
101
101
101
0
28
Binary Division
Cont.,
101.10
11101 ] 10001001110
11001
[ 100110
100101
11101
101011
11001
11101
11001
11101
11001
11101
0
0
Divide the binary number (10001.001110)2 by (111.01)2
EC214 Digital Logic Design
J Ravindranadh
Sr.Associ.Prof.
29
Octal addition
1
46
26
11
456
123
(74)8
(601)8
30
Octal Subtraction
31
Octal Multiplication
23.12 x 4.17
20606
2312
11450
11
121.0726
32
Octal Division
33
Hexadecimal addition
76
59
1
E498
473
(CF)16
(E90B)16
(118C6)16
34
Hexadecimal Subtraction
35
Hexadecimal Multiplication
15
1 CE
64 x 19
384
64
9C4
36
Hexadecimal Division
19 ] 9C4 [ 64
-96
64
by (19)16
-64
0
37
Complements
Complements are used in digital computer for simplifying the subtraction operation and for logical manipulations
There are two types of complements for each base r- system (1) the rs complement and (2) the (r-1) complements
1s complement:
The 1s complement of a binary number can be obtained by Subtracting each bit from 1. . (OR) The 1s complement
of a binary number can be obtained by changing all 1s to 0s and all 0s to 1s
Example: Find the 1s complement of (10101110)2
01010001
Find the 1s complement of (111001.10101)2
(000110.01010)
38
Complement
Cont.,
0011100
1
0011101
(01011000)2
39
or (104 -1-5412)
40
762193
1
762194
0r (106 -237806)
0.6732
1
0.6733
0r (100 - 0.3267)
74.360
1
74.361
0r (102 - 25.639)
41
42
540671
1
540672
0.4510
1
0.4511
43
44
DC8EF9
1
DC8EFA
0.CD98
1
0.CD99
45
1
110010
+0 1 1 0 1 1
1001101
Carry
add carry +
1
001110
Carry
add carry
100001
+ 111001
1011010
+
1
011011
46
10101.00
+
1
101.01
Carry
add carry
1
1010.10
+1 0 1 0 . 1 0
Carry
add carry
10101.10
+ 11000.00
+
101101.10
1
01101.11
47
1s Complement (1101.11)2
1010.10
+0 0 1 0 . 0 0
1100.10
no carry
1s Complement (1100.11)2
-11.01
10101.10
( - 1 0 1 0.0 1)2
no carry
48
Discard Carry
110010
+0 1 1 1 0 0
1001110
2s Complement (110)2
Discard Carry
100001
+ 111010
1011011
49
1
1010.10
1010.11
10101.01
10101.10
11000.01
101101.11
50
2s Complement (111011.101)2
101110.111
+ 000100.011
2s Complement (1 1 0 0 1 1 . 0 1 0 )2
110011.010
=-1100.110
10101.101
+ 00111.010
11100.111
= -1 1 . 0 0 1
51
52
9s complement (25)
83
+7 4
157
Carry
add carry
1
58
using 9s Complement method
5250
9s complement (321)
+9 6 7 8
14928
Carry
add carry
+
1
4929
EC214 Digital Logic Design
J Ravindranadh
Sr.Associ.Prof.
53
=-0980
54
10 s Complement (2100)10
114 70
Discard Carry
72532
+96750
10 s Complement (3250)10
169282
Discard Carry
EC214 Digital Logic Design
J Ravindranadh
Sr.Associ.Prof.
55
753
+ 1 3 6
889
no carry
10s complement = - 1 1 1
no carry
56
CODES
57
BCD uses the binary number system to specify the decimal numbers
0 to 9.
BCD represent each digit in 4 bit form. It is also called 8 4 2 1 code.
There are six illegal combinations in BCD code they are 1010, 1011,
1100, 1101,1110 and 1111.
Example:
Binary
58
The disadvantage is less efficient than the pure binary and its
requires more bits. Another disadvantage is that, arithmetic
operations are more complex than they are in pure binary.
59
Excess-3 code
The Ex-3 code can be obtained add 3 to the each decimal digit before converting it
into equivalent binary.
Example:
(90)10
+3 +3
1100 0011 EX-3 code
The ex-3 code has six invalid states 0000, 0001, 0010, 1101, 1110, 1111
Excess-3 code is also called unweighted code.
Ex-3 code is called self complementary code . 9s complement of code word i.e 9
N equal to the 1 complement of the code word .
Example : (4)10
60
Add MSB of the binary to the next bit in binary write the sum
and ignoring the carry. Add the 2nd bit to the 3rd bit of the
binary and so on, write the successive sums.
Decimal
Binary
Gray
0111
0100
0000
1000
1100
0001
0001
1001
1101
0010
0011
10
1010
1111
0011
0010
11
1011
1110
0100
0110
12
1100
1010
0101
0111
13
1101
1011
0110
0 1 0 1 J Ravindranadh
Decima Binar
l
y
Gray
0000
61
Gray code
In gray code any two adjacent code groups differ only in one bit
position.
Gray code also called reflected code because the two least
significant bits for decimal 4 through 7 are the mirror images of
those for 0 through 3. Similarly the three least significant bits
from 8 to 15 are the mirror image of those for 0 through 7.
They are also used in shaft encoders, I/O devices, A/D converters
and other peripheral equipment.
62
Gray code
10101111
11100110
0
+
1
+
1
0
+
0
1
+
0
1
+
1
+
63
Alphanumeric code
64
1010
1
1111
0
1111
1
65