Digital Logic Design and Circuit
Digital Logic Design and Circuit
Lecture#1
An Introduction, Orientation,
Number System
WEEK#1
By: Engr. Dr. Muhammad Afzal
ORIENTATION
TEXT BOOK
Digital Design By Morris Mano
(Available in your library)
COURSE OUTLINE
WILL BE MADE AVAILABLE ON GROUP
What do you understand by term
“Digital Logic Design”
• What is digital?
• What is logic?
• What is digital?
• What is Logic?
• A logic is a predefined way to understand things
or to perform tasks. Take daily life examples of
logical tasks.
– How can you solve math?
– How can you drive car?
What do you understand by term
“Digital Logic Design”
• Example (100100)2
Decimal Number System
• A decimal number system has 10 digits
0,1,2,3,4,5,6,7,8,9 and so its base or radix is 10.
• Example (1394)10
Octal Number System
• An octal number system has eight digits
0,1,2,3,4,5,6,7 and so its base or radix is 8.
• Example (127)8
Hexadecimal Number System
• A hexadecimal number system has sixteen digits
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F, and so its base or
radix is 16.
• A=10, B=11, C=12, D=13, E=14, F=15
• Example: (A08)16
Time to test you
• Which One is true or false:
• (134)10
• (A139)16
• (192)8
• (A76)10
• (29)2
Conversions Between Number
Systems
Conversions Between Number Systems
• Sometimes we need to convert our number system
into another number system so that our machines or
computers can understand our statements or logics.
• For example computer only understand Logic 0 or
logic 1, than how it is going to understand number
(14)10 ?
• We will do both.
Lets Begin!
Any Number System to Decimal
(Weight Method)
Converting Binary, Octal or
Hexadecimal to decimal
(Without Decimal Points)
Any Number to Decimal Conversion
• We will use “number weight” method to convert
any number system into decimal.
• Weight method is pretty straight forward and
easy to apply.
• Consider following examples to see how this
method works.
HELP TABLE FOR POWERS
BINARY TO DECIMAL
Binary to Decimal Conversion: Examples
=16+0+0+2+1=(19)10 .
=16+8+0+2+1=(27)10 .
=0+0+4+2+1=(7)10 .
OCTAL TO DECIMAL
Octal to Decimal Conversion: Examples
1. (761)8 = (7x82)+(6x81)+(1x80)
=(7x64)+(6x8)+1=(497)10 .
2. (223)8 = (2x82)+(2x81)+(3x80)
=(2x64)+(2x8)+3=(147)10 .
3. (131)8 = (1x82)+(3x81)+(1x80)
HEXADECIMAL TO DECIMAL
Hexadecimal to Decimal Conversion: Examples
1. (A4)16 = (10x161)+(4x160)
=(10x16)+(4x1)=(164)10
2. (D6)16 = (13x161)+(6x160)
=(13x16)+(6x1)=(214)10 .
3. (7F)16 = (7x161)+(15x160)
=(7x16)+(15x1)=(127) .
Converting Binary, Octal or
Hexadecimal to decimal
(With Decimal Points)
BINARY TO DECIMAL
Binary to Decimal Conversion: Examples
=4+0+1+0.5+0.25=(5.75)10 .
=4+2+1+0.5=(7.5)10 .
=0+0+1+0.5+0.25=(1.75)10 .
OCTAL TO DECIMAL
Octal to Decimal Conversion: Examples
1. (761.1)8 = (7x82)+(6x81)+(1x80) +(1x8-1)
=(7x64)+(6x8)+1+0.125=(497.125)10 .
2. (223.2)8 = (2x82)+(2x81)+(3x80)+(2x8-1)
=(2x64)+(2x8)+3+(2x0.125)=(147.25)10 .
3. (131.3)8 = (1x82)+(3x81)+(1x80)+(3x8-1)
=(1x64)+(3x8)+1+(3x0.125)=(59.375)10 .
HEXADECIMAL TO DECIMAL
Hexadecimal to Decimal Conversion: Examples
1. (A4.1)16 = (10x161)+(4x160)+(1x16-1)
=(10x16)+(4x1)+(0.0625)=(164.0625)10
2. (D6.2)16 = (13x161)+(6x160)+(2x16-1)
=(13x16)+(6x1)+(2x0.0625)=(214.125)10 .
3. (7F.3)16 = (7x161)+(15x160)+(3x16-1)
=(7x16)+(15x1)+(3x0.0625)=(127.1875)10 .
Any Number System to Binary
Converting Decimal, Octal or
Hexadecimal to Binary
DECIMAL TO BINARY
Decimal to Binary Conversion
• We will use “LCM” method to convert decimal
into binary.
• Weight method is pretty straight forward and
easy to apply.
• Consider following examples to see how this
method works.
DECIMAL TO BINARY
1. (72)10 = (1001000)2
2. (17)10=(10001)2
3. (23)10 = (10111)2
4. (34)10 = (0100010)2
HEXADECIMAL AND OCTAL
TO BINARY
HEXADECIMAL AND OCTAL TO BINARY
• For octal we use “23” as a standard as 8= 23
• (11100001)2
• (11110101.11)2
• (01110111010101)2
• (341)8
• (FA.D)16
• (3D1E.A)16
• (3 D 1 E.A)16 =(11110100011110.101)2 ,
SUMMARY