Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
12 views

Digital Logic Design and Circuit

DLD lecture 1

Uploaded by

saadmakki116
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Digital Logic Design and Circuit

DLD lecture 1

Uploaded by

saadmakki116
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 71

Digital Logic Design

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?

• How to design logic?


What do you understand by term
“Digital Logic Design”

• What is digital?

• Digital is a discrete signal, that is either it 1 or 0

or on and off, i.e, it has only two possible states.


Take simple Example of a clock
• We have both analogue and digital clocks.
Digital v/s Analogue
Analogue Digital
• Analog signal is a continuous • Digital signals are discrete
signal which represents physical time signals generated by
measurements. digital modulation
• Denoted by sine waves • Denoted by square waves
• Human voice in air, analog • Computers, CDs, DVDs, and
electronic devices. other digital electronic
devices.
• Less immune to errors, distortion • Highly immune to errors,
and delays distortion and delays
Digital v/s Analogue
What do you understand by term
“Digital Logic Design”

• 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”

• How can a computer or machine can make these


logics?
• This is what this course is all about.
NUMBER SYSTEMS
What do you mean by a Number?

• Say, what is meant by digit “2” or digit “3”?


• A number is actually a symbol which is used by
us to solve our daily life problems.
What is a system of a number?
Take simple Example Of a clock
• A number system of clock is from 1 to 12.
Take simple Example Of a clock
• Suppose its 12-pm now. What will be the time
after 14 hours?
Take simple Example Of a clock
• A clock is a number system, which has hours
from 1 to 12, what happens if we have more than
12hr?
• For example, what will b the time after 24hr from
now on?
• Surely clock has no 24 digit on it, so we need to
convert it, so that we can have any digit between
Number Systems
• This how other number systems are made.

• There are many types of number systems


we need to study in order to understand the
operation performed by computers
Types of Number Systems
Types of Number Systems
• Binary Number System

• Decimal Number System

• Octal Number System

• Hexadecimal Number System


Types of Number Systems
Base or Radix of a number
• In mathematical numeral systems,
the radix or base is the number of unique digits,
including zero, used to represent numbers in a
positional numeral system.
• For example, for the decimal system (the most
common system in use today) the radix is ten,
because it uses the ten digits from 0 through 9.
Binary Number System
• A binary number system has two digits 0 and 1,
and so its base or radix is 2

• 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 ?

• Its mean we need to convert our number given in


decimal, into Binary Number.
We will do all following Conversions
REMEMBER
• A number can be in whole form or with decimal
point.

• Example: Without Decimal Point (1009)10

• Example: With Decimal Point (11.21)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

1. (10011)2 = (1x24)+(0x23)+(0x22) +(1x21)+(1x20)

=16+0+0+2+1=(19)10 .

2. (11011)2 = (1x24)+(1x23)+(0x22) +(1x21)+(1x20)

=16+8+0+2+1=(27)10 .

3. (00111)2 = (0x24)+(0x23)+(1x22) +(1x21)+(1x20)

=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

1. (101.11)2 = (1x22)+(0x21)+(1x20) +(1x2-1)+(1x2-2)

=4+0+1+0.5+0.25=(5.75)10 .

2. (111.1)2 = (1x22)+(1x21)+(1x20) +(1x2-1)

=4+2+1+0.5=(7.5)10 .

3. (001.11)2 = (0x22)+(0x21)+(1x20) +(1x2-1)+(1x2-2)

=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

• For Hexadecimal we use “24” as a standard as 16= 24

• So to represent a digit of octal number system, we


need three bits of binary system.
• So to represent a digit of Hexadecimal number
system, we need 4 bits of binary system.
• We will use tables to convert an octal digit and
hexadecimal digit to binary and vise versa.
OCTAL TO BINARY AND VISE
VERSA
OCTAL TO BINARY TABLE

BINARY DIGITS OCTAL


(23=8) NUMBER IN WEIGHT DIGIT
0 0 0 (0x22) +(0x21)+ (0x20)=0+0+0=0 0
0 0 1 (0x22) +(0x21)+ (1x20)=0+0+1=1 1
0 1 0 (0x22) +(1x21)+ (0x20)=0+2+0=2 2
0 1 1 (0x22) +(1x21)+ (1x20)=0+2+1=3 3
1 0 0 (1x22) +(0x21)+ (0x20)=4+0+0=4 4
1 0 1 (1x22) +(0x21)+ (1x20)=4+0+1=5 5
1 1 0 (1x22) +(1x21)+ (0x20)=4+2+0=6 6
1 1 1 (1x22) +(1x21)+ (1x20)=4+2+1=7 7
HEXADECIMAL TO BINARY
AND VISE VERSA
HEXADECIMAL TO BINARY
LETS PRACTISE !
PRACTISE QUESTIONS
Convert following octal numbers to binary
• (17)8
• ( 1 7 )8 =(001 111 )2
• (776.3)8
• (776.3)8 =(111 111 110.011)2 (error in
slides)
• (1543.5)8
• (1543.5)8 =(001 101 100 011 101)2
PRACTISE QUESTIONS
Convert following hexadecimal numbers to binary
• (8A)16
• ( 8 A )16 =( 1000 1010 )2
• (D7)16
• (D7.A)8 =(1101 0111. 1010)2
• (A4D8.E)16
• (A4D8)16 =(1010 0100 1101 1000.1110)2
BINARY TO OCTAL AND
HEXADECIMAL
BINARY TO OCTAL AND HEXADECIMAL

BINARY DIGITS OCTAL


(23=8) NUMBER IN WEIGHT DIGIT
0 0 0 (0x22) +(0x21)+ (0x20)=0+0+0=0 0
0 0 1 (0x22) +(0x21)+ (1x20)=0+0+1=1 1
0 1 0 (0x22) +(1x21)+ (0x20)=0+2+0=2 2
0 1 1 (0x22) +(1x21)+ (1x20)=0+2+1=3 3
1 0 0 (1x22) +(0x21)+ (0x20)=4+0+0=4 4
1 0 1 (1x22) +(0x21)+ (1x20)=4+0+5=5 5
1 1 0 (1x22) +(1x21)+ (0x20)=4+2+0=6 6
1 1 1 (1x22) +(1x21)+ (1x20)=4+2+1=7 7
HEXADECIMAL TO BINARY
PRACTISE QUESTIONS
Convert following binary numbers to octal and hexadecimal:

• (11100001)2

• (011 100 001)2 =(341)8, (0000 1110 0001)2 =(E1)16

• (11110101.11)2

• (011 110 101. 110)2 =(365. 6)8 ,

• (00000 1111 0101.1100)2 =(F5.C)16

• (01110111010101)2

• (001 110 111 010 101)2 =(16725)8 ,


OCTAL TO HEXADECIMAL
AND VISE VERSA
OCTAL TO HEXADECIMAL AND VISE VERSA

• For this conversion first convert given octal


number to binary or given hexadecimal to
binary, and then convert it into hexadecimal or
octal, respectively.
PRACTISE QUESTIONS
Convert following octal and hexadecimal numbers to binary:

• (341)8

• (341)8 =(011 100 001)2 , (0000 1110 0001)2 =(E 1)16

• (FA.D)16

• (FA.D)16 =(1111 1010.1101)2 ,

• (011 111 010.110 100)2 =(3 7 2.64)8

• (3D1E.A)16

• (3 D 1 E.A)16 =(11110100011110.101)2 ,
SUMMARY

We did following conversions:


• Any number to decimal for both decimal point and
without decimal point(using weight number method).
• Any number to binary and vise versa
– LCM for decimal to binary
– Table for octal and hexadecimal to binary and vise
versa.
– Octal to hexadecimal and hexadecimal to octal via
binary conversion.

You might also like