Professional Documents
Culture Documents
DLD-Lecture 2 Number Representation
DLD-Lecture 2 Number Representation
https://www.youtube.com/c/LearnRigorouslywithFarwahAhmad 17/05/2022
Course Content:
Digital Number
Systems system
Recommended Books:
1. Digital Logic and Computer
Design, Morris Mano, Prentice
Hall, 1996
2. Digital Fundamentals, Thomas
L. Floyd
https://www.youtube.com/c/LearnRigorouslywithFarwahAhmad 17/05/2022
2
Weighted/Positional
DECIMAL
Binary
Octal
Hexadecimal
https://www.youtube.com/c/LearnRigorouslywithFarwahAhmad 17/05/2022 3
General Notation
Base or Radix
MSD
n-1 2 -1
(N)R = an-1. R + ...............+ a2 .R + a1.R + a0 + a-1. R +
-2 -m LSD
a-2 . R + ...........+ a-m . R . Where N is any number.
Place Value Where “R” is base or radix of number
system.
Fractional Side
Possible Digits : (0,1, . . . , R − 1)
n-1
an-1. R = most significant digit (MSD)
Powers from right to left Powers from left to right -m -m
a . R = least significant digit (LSD)
( Power = weight)
N = (𝑎5 𝑎4 𝑎3 𝑎2 𝑎1 𝑎0 . 𝑎−1 𝑎−2 𝑎−3 ) R
https://www.youtube.com/c/LearnRigorouslywithFarwahAhmad 17/05/2022 4
Example: 1 9 3 8 . 2 5 7
. Base, or Radix is 10
Place value
So weight = 10𝑛
R=10 regarding the power of
a−1 10
a0 Coefficients aj = { 0, 1,
a1 2, 3, 4, 5, 6, 7, 8, 9 }
a2
a3 Range for n integer
n
a−2 bits = 0 – (10 – 1 )
a−3 Minimum Maximum
3 2 1 0 −1 −2 −3
= (a3×R )+(a2×R )+(a1×R )+(a0×R )+(a−1×R )+(a−2×R )+(a−3 × R ) = 000…..0 - (999…..9)
Weight Range for n integer
3 2 1 0 −1 −2 −3
= ( × 10 ) + ( × 10 ) + ( × 10 ) + ( × 10 ) + ( × 10 ) + ( × 10 ) + ( × 10 ) -m
bits = (1 – 10 )
= 1 x 1000 + 9 x 100 + 3 x 10 + 8x1+ 2 x 0.1 + 5 x 0.01 + 7 x 0.001 17/05/2022 5
Example: 1 1 0 0 . 1 1 1
. Base, or Radix is 2
Place value
So weight = 2𝑛
R=2 regarding the power of
a−1 2
a0 Coefficients aj = { 0, 1}
a1
a2 Range for n integer
n
a3 bits = 0 – (2 – 1 )
a−2 Minimum Maximum
a−3 = 000…..0 - (111…..1)
3 2 1 0 −1 −2 −3
= (a3×R )+(a2×R )+(a1×R )+(a0×R )+(a−1×R )+(a−2×R )+(a−3 × R ) Range for n integer
Weight -m
3 2 1 0 −1 −2 −3
bits = (1 – 2 )
= ( ×2 )+( ×2 )+( ×2 )+( ×2 )+( ×2 )+( ×2 )+( ×2 )
= 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
Example: 2 6 . 2 4
. Base, or Radix is 8
Place value
So weight = 8𝑛
R=8 regarding the power of
a−1 8
a0 Coefficients aj = { 0,
a1 1,2,3,4,5,6,7}
a0 Coefficients aj = { 0,
1,2,3,4,5,6,7,8,9,A,B,C,
a1 D,F}
a2
a3 Range for n integer
n
bits = 0 – (16 – 1 )
Minimum Maximum
3 2 1 0 −1 = 000…..0 - (FFF…..F)
= (a3×R )+(a2×R )+(a1×R )+(a0×R )+(a−1×R )
Range for n integer
Weight
-m
3 2 1
= ( × 16 ) + ( × 16 ) + ( × 16 ) + ( × 16 ) + ( × 16 )
0 −1 bits = (1 – F )
https://www.youtube.com/c/LearnRigorouslywithFarwahAhmad 17/05/2022