04 DLD Lec 04 Number Systems Dated 08 Mar 2021 Slides

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Digital Logic Design

Lec No 04 : Number Systems

Spring 2021, BESE-11AB

Dated 08 March 2021

By Nasir Mahmood

[email protected]

[email protected] 1
Tips to Get good Grades
• Focus on learning rather than getting marks

• Clarify your queries in the class by asking


maximum questions and participate on
forum to clear your doubts

• Follow a study schedule to revise your


lectures

• Make other people understand, try to teach


to other students

• Do your assignments and project yourself

• Read more on courses on web

• Practice coding on regular basis


Introduction to Digital System
Computer manipulate discrete information

Any set that is restricted to a finite number of elements contains discrete


information

Example 10 digits, 26 letters, 52 playing cards, 64 squares of chess board

Discrete information is represented by physical quantities


called signals

Electric voltage and current are common

Transistor are used to implement the signals

Two discrete values called Binary


Numbers

5382
What is this number?

Five thousand three hundred and eighty two

5382 = 5000 + 300 + 80 + 2

= 5 x 103 + 3 x 102 + 8 x 101 + 2 x 100


Digits

Base
Numbers Contd..
1011001.101

• What does this number represent?

• Consider the base (or radix) of the number.

Base = 2
Binary Number System
Digits = 0, 1

(1011001.101)2 = 1x26 + 0x25 + 1x24 + 1x23 + 0x22 +


0x21 + 1x20 + 1x2-1 + 0x2-2 + 1x2-3 = (89.625)10
Numbers Contd..
R is the radix or base of the number system

− Must be a positive number

− R digits in the number system: [0 .. R-1]

Important number systems for digital systems:

− Base 2 (binary): [0, 1]

− Base 8 (octal): [0, 1, 2, 3, 4, 5, 6, 7]

− Base 16 (hexadecimal):

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F]
Numbers Contd..

D = (a4 a3 a2 a1 a0 . a-1 a-2 a-3 )R

D = decimal value

ai = ith position in the number

R = radix or base of the number


Numbers Contd..

Power Series Expansion


D = an x r4 + an-1 x r3 + … + a0 x r0

+ a-1 x r-1 + a-2 x r-2 + … a-m x r-m

D = decimal value a

i = ith position in the number

r = radix or base of the number


Numbers Contd..
Conversion between
Number Systems
Base r to Decimal
Conversion
• The conversion of a number in base r to
decimal is done by expanding the number in
a power series and adding all the terms

(4021.2)5 = ?
(4021.2)5 = 4x53 + 0x52 + 2x51 + 1x50 + 2x5-1

= (511.4)10
The End

You might also like