Download presentation
Presentation is loading. Please wait.
Published byStuart Palmer Modified over 9 years ago
1
Computer Number Systems
2
d n-1 d n-2 d n-3 --- d 2-m d 1-m d -m Conventional Radix Number r is the radixd i is a digit d i Є {0, 1, ….., r – 1 } -m ≤ i < n
3
d n-1 d n-2 d n-3 --- d 2 d 1 d 0 Conventional Radix Number (Integer Part) r is the radixd i is a digit d i Є {0, 1, ….., r – 1 } 0 ≤ i < n
4
.d -1 d -2 d -3 --- d m d 1-m d -m Conventional Radix Number (Fraction Part) r is the radixd i is a digit d i Є {0, 1, ….., r – 1 } 0 ≤ i < n
5
N = d n-1 w n-1 + d n-2 w n-2 + --- + d 1-m w -m The Conventional Number System is a Positional Weighted System N = ∑ d i. w i
6
Most Significant Digit & Least Significant Digit MSD corresponds to digit with maximum weight LSD corresponds to digit with minimum weight
7
d n-1 d n-2 d n-3 --- d 2-m d 1-m d -m MSD Most Significant Digit LSD Least Significant Digit b n-1 b n-2 b n-3 --- b 2-m b 1-m b -m MSB Most Significant Bit LSB Least Significant Bit For all Number Systems For the Binary Number System
8
N = d n-1 w n-1 + d n-2 w n-2 + ---- + d -m w -m The Conventional Number System is a Positional Weighted System N = ∑ d i. w i
9
In a Fixed-Radix Number System w i = r i N = ∑ d i. w i => N = ∑ d i. r i N = ∑ d i. r i
10
Examples (7051) 10 = 7 x 10 3 + 0 x 10 2 + 5 x 10 1 + 1 x 10 0 = 7000 + 000 + 50 + 1 = 7051 (.27) 10 = 2 x 10 -1 + 7 x 10 -2 =.2 +.07 =.27 (34.903) 10 = 3 x 10 1 + 4 x 10 0 + 9 x 10 -1 + 0 x 10 -2 + 3 x 10 -3 = 31 + 4 +.9 +.00 +.003 = 34.903 Decimal Number System : Radix 10 d i = {0, 1, 2, 3, 5, 6, 7, 8, 9}
11
Examples (7051) 8 = 7 x 8 3 + 0 x 8 2 + 5 x 8 1 + 1 x 8 0 = (.27) 8 = 2 x 8 -1 + 7 x 8 -2 = (34.903) 8 = 3 x 8 1 + 4 x 8 0 + 9 x 8 -1 + 0 x 8 -2 + 3 x 8 -3 = Octal Number System : Radix 8 d i = {0, 1, 2, 3, 5, 6, 7}
12
Examples (72A) 16 = 7 x 16 2 + 2 x 16 1 + 10 x 16 0 = (.CF1) 16 = 12 x 16 -1 + 15 x 16 -2 + 1 x 16 -3 = (3B.2D) 16 = 3 x 16 1 + 11 x 16 0 + 2 x 16 -1 + 13 x 16 -2 = Hexadecimal Number System : Radix 16 d i = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}
13
Examples (101) 2 = 1 x 2 2 + 0 x 2 1 + 1 x 2 0 = 4 + 0 + 1 = 5 (.0101) 2 = 0 x 2 -1 + 1 x 2 -2 + 1 x 2 -3 + 0 x 2 -4 = 0 +.25 + 0 +.06125 =.31125 (10.101) 2 = 1 x 2 1 + 1 x 2 0 + 1 x 2 -1 + 0 x 2 -2 + 1 x 2 -3 = 2 + 0 +.5 + 0 +.25 = 2.75 Binary Number System : Radix 2 d i = {0, 1}
14
Base Conversion Integer Part
19
Base Conversion Fraction Part
22
Base Conversion Both Integer and Fraction Part
25
Representation of Signed Numbers Integer Part
26
(a n ) a n-1 a n-2 a n-3 --- a 2 a 1 a 0 Sign of a n-Digit Signed Number The (n+1) th digit a n is the sign digit 0 if A ≥ 0 r- 1 if A < 0 a n =
27
Magnitude of a n-Digit Signed Number There are 3 different ways to represent the magnitude Sign Magnitude Form (SMF) Diminished Radix Complement Form (DRC) Radix Complement Form (RC) DRC is also known as (r-1)’s complement RC is also known as r’s complement
28
SMF (0) a n-1 a n-2 --- a 2 a 1 a 0 DRC (0) a n-1 a n-2 --- a 2 a 1 a 0 RC (0) a n-1 a n-2 --- a 2 a 1 a 0 If A is a positive number [ A ≥ 0 ]
29
SMF (r-1) a n-1 a n-2 --- a 2 a 1 a 0 DRC (r-1) ā n-1 ā n-2 --- ā 2 ā 1 ā 0 RC (r-1) ā n-1 ā n-2 --- ā 2 ā 1 ā 0 + 1 where,ā i = (r-1) - a i r = radix If A is a negative number [ A < 0 ]
30
ā n-1 ā n-2 ---- ā 2 ā 1 ā 0 a n-1 a n-2 ---- a 2 a 1 a 0 (r-1) n-1 (r-1) n-2 ---- (r-1) 2 (r-1) 1 (r-1) 0 The ā i notation is implicative of –
31
Addition
33
Subtraction
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.