NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
DLD-Lecture 2 Number Representation.pdf
1. Lecturer: Ms. Farwah Ahmad
17/05/2022
https://www.youtube.com/c/LearnRigorouslywithFarwahAhmad
1
2. Course Content:
Recommended Books:
1. Digital Logic and Computer
Design, Morris Mano, Prentice
Hall, 1996
2. Digital Fundamentals, Thomas
L. Floyd
17/05/2022
https://www.youtube.com/c/LearnRigorouslywithFarwahAhmad
2
Digital
Systems
Number
system
4. General Notation
Base or Radix
MSD
(N)R
= an-1. R
n-1
+ ...............+ a2 .R
2
+ a1.R + a0 + a-1. R
-1
+
a-2 . R
-2
+ ...........+ a-m . R
-m
.
LSD
Place Value
Fractional Side
Coefficients an = a5a4a3a2a1a0 . a-1a-2a-3
Integral Side Radix Point
Powers from right to left Powers from left to right
N = (𝑎5𝑎4𝑎3𝑎2𝑎1𝑎0 . 𝑎−1𝑎−2𝑎−3 ) R
( Power = weight)
Where N is any number.
Where “R” is base or radix of number
system.
Possible Digits : (0,1, . . . , R − 1)
an are the coefficients and the subscript
value n gives the place value.
Any Coefficient an has weight = R
n
an-1. R
n-1
= most significant digit (MSD)
a
-m
. R
-m
= least significant digit (LSD)
17/05/2022
https://www.youtube.com/c/LearnRigorouslywithFarwahAhmad 4
5. Example: 1 9 3 8 . 2 5 7
.
Place value
R=10
a−1
a0
a1
a2
a3
a−2
a−3
= (a3×R
3
)+(a2×R
2
)+(a1×R
1
)+(a0×R
0
)+(a−1×R
−1
)+(a−2×R
−2
)+(a−3 × R
−3
)
Weight
= ( × 10
3
) + ( × 10
2
) + ( × 10
1
) + ( × 10
0
) + ( × 10
−1
) + ( × 10
−2
) + ( × 10
−3
)
= 1 x 1000 + 9 x 100 + 3 x 10 + 8 x 1 + 2 x 0.1 + 5 x 0.01 + 7 x 0.001
Base, or Radix is 10
So weight = 10𝑛
regarding the power of
10
Coefficients aj = { 0, 1,
2, 3, 4, 5, 6, 7, 8, 9 }
Range for n integer
bits = 0 – (10
n
– 1 )
Minimum Maximum
= 000…..0 - (999…..9)
Range for n integer
bits = (1 – 10
-m
)
17/05/2022 5
6. Example: 1 1 0 0 . 1 1 1
.
Place value
R=2
a−1
a0
a1
a2
a3
a−2
a−3
= (a3×R
3
)+(a2×R
2
)+(a1×R
1
)+(a0×R
0
)+(a−1×R
−1
)+(a−2×R
−2
)+(a−3 × R
−3
)
Weight
= ( × 2
3
) + ( × 2
2
) + ( × 2
1
) + ( × 2
0
) + ( × 2
−1
) + ( × 2
−2
) + ( × 2
−3
)
= 1 x 8 + 1 x 4 + 0 x 2 + 0 x 1 + 1 x 0.5 + 1 x 0.25 + 1 x 0.125 17/05/2022 6
Base, or Radix is 2
So weight = 2𝑛
regarding the power of
2
Coefficients aj = { 0, 1}
Range for n integer
bits = 0 – (2
n
– 1 )
Minimum Maximum
= 000…..0 - (111…..1)
Range for n integer
bits = (1 – 2
-m
)
7. Example: 2 6 . 2 4
.
Place value
R=8
a−1
a0
a1
a−2
= (a1×R
1
)+(a0×R
0
)+(a−1×R
−1
)+(a−2×R
−2
)
Weight
= ( × 8
1
) + ( × 8
0
) + ( × 8
−1
) + ( × 8
−2
)
= 2 x 8 + 6 x 1 + 2 x 0.125 + 4 x 0.015625 17/05/2022 7
Base, or Radix is 8
So weight = 8𝑛
regarding the power of
8
Coefficients aj = { 0,
1,2,3,4,5,6,7}
Range for n integer
bits = 0 – (8
n
– 1 )
Minimum Maximum
= 000…..0 - (777…..7)
Range for n integer
bits = (1 – 8
-m
)
8. Example: F A F A . B
.
Place value
R=16
a−1
a0
a1
a2
a3
= (a3×R
3
)+(a2×R
2
)+(a1×R
1
)+(a0×R
0
)+(a−1×R
−1
)
Weight
= ( × 16
3
) + ( × 16
2
) + ( × 16
1
) + ( × 16
0
) + ( × 16
−1
)
= 15 x 4096 + 10 x 256 + 15 x 16 + 10 x 1 + 11 x 0.0625 17/05/2022 8
Base, or Radix is 16
So weight = 16𝑛
regarding the power of
16
Coefficients aj = { 0,
1,2,3,4,5,6,7,8,9,A,B,C,
D,F}
Range for n integer
bits = 0 – (16
n
– 1 )
Minimum Maximum
= 000…..0 - (FFF…..F)
Range for n integer
bits = (1 – F
-m
)