L e ar n i n g Ob j e c t i v es I n t h i s c h ap ter y o u w il l l e a r n ab o u t: • N o n-p os i t i o n a l nu mb e r s y s t em • P os i t i o n a l nu mb e r s y s t em • D e c i m al n u mb e r s y s t em • B i n a r y nu mb e r s y s t em • O c t al nu mb e r s y s t em • He x a d e c i m al nu mb e r s y s t em ( Cont i nu e d on ne x t sl i de)
L e ar n i n g Ob j e c t i v es ( Co nti n u ed f r o m pr e v i o u s s li de ..) C o n v e r t a nu mb e r ’ s b a se • A n o th e r b a s e t o d e c i m al b a se • D e c i m al b a s e t o a n o th e r b a se • S o m e b a s e t o a n o th e r b a se S h or t c u t m e th o d s f o r c on v er t i ng • B i n a r y t o oc t al nu mb er • O c t al t o b i n a r y nu mb er • B i n a r y t o h e xa d e c i m al n u mb er • He x a d e c i m al t o b i n a r y n u mb er F r a c t i o n a l nu mb er s i n b in a r y nu mb er • • s y s t em •
Num b e r S y s t e ms T w o typ e s of nu m b e r s y s te m s a r e: N o n-p os i t i o n a l nu mb e r s y s t e ms • P os i t i o n a l nu mb er s y s t e ms •
N o n -p o s i t i o n al Num b e r S y s t e ms C h a r a ct e r i s t i cs • U s e s y mb o l s s u c h as I f o r 1 , I I f o r 2 , III f o r 3 , IIII fo r 4 , I I III f o r 5 , e tc • E a c h s y mb o l re p re s e nt s th e s a m e va l u e re g a r d l e ss o f i t s p os i t i o n i n th e n u mb er • T h e s y mb o l s a r e s i mp l y a dd e d t o f i n d o u t th e va l u e o f a p a r t i c u l ar nu mb er • D i f f i c u l ty • I t i s d i f f i c u l t t o p er f o r m nu mb e r s y s t em a r i thm e t i c w i t h s u c h a •
P o s i ti o n a l Num b e r S y s t e ms C h a r a ct e r i s t i cs • U s e o n l y a f e w s y mb o l s c a l l e d d i g i ts • T h e s e s y m b o l s re p r e s en t d i ff ere n t va l u e s d e p e nd i ng • o n th e p os i t i o n th e y oc c up y i n t h e nu mb er ( Cont i nu e d on ne x t sl i de)
P o s i ti o n a l Num b e r S y s t e ms ( Co nti n u ed f r o m pr e v i o u s s li de ..) T h e va l u e of each digit is determined by: • 1. 2. 3. T h e digit itself T h e position of the digit in the number T h e base of the number system ( b a s e = s y s t e m) t o t al nu mb e r o f d i g i t s i n th e nu mb er T h e m a x i m u m va l u e o f a s i n g l e d i g i t i s a l ways e qu al t o o n e l e s s th an th e va lu e of th e b a se •
D ec i m a l Nu m b e r S y s t em C h a r a ct e r i s t i cs A p os i t i o n a l nu mb e r s y s t em H as 1 s y mb o l s o r d i g i t s (0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , • • 8 , 9) . He n c e , i t s b a s e = 10 T h e m ax i m u m va l u e o f a s i n g l e d i g i t i s 9 ( one l e s s th an th e va lu e o f th e b a s e) • E a c h p o s i t i o n o f a d i g i t re p rese nt s a s p e c i f i c • p o w e r o f th e We u s e th i s l i fe b a s e (10) nu mb e r s y s t e m i n o u r d ay -t o -d a y • ( Cont i nu e d on ne x t sl i de)
D ec i m a l Nu m b e r S y s t em ( Co nti n u ed f r o m pr e v i o u s s li de ..) Exa mp le 2586 1 = ( 2 x 1 3 ) + ( 5 x 1 2 ) 1 1 ) x 1 ) + ( 8 x + ( 6 = 200 + 50 + 8 + 6
Bi n ary Num b e r S y s t em C h a r a ct e r i s t i cs A p os i t i o n a l nu mb e r s y s t em H as o n l y 2 s y mb o l s o r d i g i t s ( a n d 1) . H e n c e i t s b a s e = 2 T h e m ax i m u m va l u e o f a s i n g l e d i g i t i s 1 ( o n e l e s s th an th e va lu e o f th e b a s e) E a c h p o s i t i o n o f a d i g i t re p r e s e nt s a s p e c i f i c p o w e r o f th e b a s e (2) • • • • T h i s nu mb e r s y s t e m i s u s e d i n co mp ut ers • ( Cont i nu e d on ne x t sl i de)
Bi n ary Num b e r S y s t em ( Co nti n u ed f r o m pr e v i o u s s li de ..) Ex a mp le 10101 2 = (1 x 2 4 ) + (0 x 2 3 ) + (1 x 2 2 ) + (0 x 2 1 ) x (1 x 2 ) = 1 6 + + 4 + + 1 = 2 1 10
R e p r e s e n t ing N u mb e r s in Dif f e r e n t N umb e r Sy s t e ms I n or d e r t o b e s p e c i f i c a b o u t w h i c h nu mb e r s y s t e m w e th e a r e r e f e rr i n g t o , i t i s a co m m o n p r a c t i c e t o i n d i c a t e b a s e as a s ub scr i pt . T h u s, we w r i t e: 10101 2 = 2 1 10
Bit • Bi t s t a nds f or b i na r y d i g i t • A b i t i n c o m puter te r m i no l og y m eans e i t h er a or a 1 • A b i na r y nu m ber nu m ber c on s i s t i ng of n b i ts i s c a l l e d an n - b i t
Oc t a l Num b e r S y s t em C h a r a ct e r i s t i cs A p os i t i o n a l nu mb e r s y s t em H as t o t al 8 s y m b o l s o r d i g i t s H e n c e , i t s b a s e = 8 • • (0 , 1 , 2 , 3 , 4 , 5 , 6 , 7) . T h e m a x i m u m va l u e o f a s i n g l e d i g i t i s 7 ( o n e l e ss th an th e va lu e o f th e b a se • E a c h p os i t i o n of a d i g i t re p r e s e nt s a s p e c i f i c p o w er of • th e b a s e (8) ( Cont i nu e d on ne x t sl i de)
Oc t a l Num b e r S y s t em ( Co nti n u ed f r o m pr e v i o u s s li de ..) • S i n c e th ere a r e o n l y 8 d i g i t s, 3 b i t s ( 2 3 = 8) a re s u ff i c i e n t t o re p re s e n t a n y oc t al nu mb e r i n b in a ry Ex a mp le 2057 8 = = ( 2 x 8 3 ) + ( x 8 2 ) + ( 5 x 8 1 ) + ( 7 x 8 ) 102 4 + + 4 + 7 = 107 1 10
He xa d e c i m al N um b e r S y s t em C h a r a ct e r i s t i cs A p os i t i o n a l nu mb e r s y s t em H as t o t al 1 6 s y mb o l s o r d i g i t s (0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , • • 8 , 9 , A , B , C, D, E , F) . He n c e i t s b a s e = 16 T h e s y mb o l s A , B, C, D, E a n d F r e p r e s e n t th e d e c i m al v a l u e s 10 , 11 , 12 , 13 , 1 4 a n d 15 res p e c t i v e ly • T h e m a x i m u m th an th e va lu e va l u e o f a s i n g l e o f th e b a s e) d i g it i s 15 ( o n e l e ss • ( Cont i nu e d on ne x t sl i de)
He xa d e c i m al N um b e r S y s t em ( Co nti n u ed f r o m pr e v i o u s s li de ..) • E a c h p os i t i o n o f a d i g i t re p r e s e nt s a s p e c i f i c p o w er o f th e b a s e (16) • Sin c e th er e a r e o n l y 1 6 d i g i t s , 4 b i t s (2 4 = 16 ) a re s u ff i c i e n t t o re p r e s e n t a n y h e xa d e c i m al nu mb er b i n a ry i n Ex a mp le 1AF 16 = = = = ( 1 x 16 2 ) + ( A x 16 1 ) + ( F x 1 6 ) 1 x 25 6 + 1 0 x 1 6 + 1 5 x 1 25 6 + 16 + 15 43 1 10
C o nv e rt ing a N u m b e r o f A n ot h e r Ba s e t o a D e cimal N umb er M ethod St e p 1: D e t er m i n e th e co l u m n (p os i t i o n a l ) v a l u e o f e a c h d i g it St e p 2: M u l t i p l y th e o b t a in e d co l u m n va lu e s b y th e d i g i t s i n t h e co r res p o nding co l u m ns St e p 3: Ca l c u l a t e th e s u m of th e s e p r o du c ts ( Cont i nu e d on ne x t sl i de)
C o nv e rt ing a N u m b e r D e cimal N umb er ( Co nti n u ed f r o m pr e v i o u s s li de ..) o f A n ot h e r Ba s e t o a E xample 47 06 8 = ? 10 C o mm o n v a l u e s m u ltiplied b y t h e c o rr e s p o n di n g digits 4706 8 = 4 x 8 3 + 7 x 8 2 + x 8 1 + 6 x 8 = = = 4 x 5 1 2 + 7 2 4 8 + 4 48 25 2 10 x 6 4 + + 6 x 1 + + 6 Sum of th e se produ c ts
C o nv e rt ing a D e c i mal N umb e r t o a N umb e r o f A n ot h e r Ba se Divi s i o n-R e main d e r M e t h od St e p 1: D i v i d e th e d e c i m a l nu mb e r t o b e co n v er t e d b y th e va l u e o f th e n e w b a se St e p 2: R e cor d th e r e m a i nd er f ro m St e p 1 as the the r i ghtm os t n e w b a s e d i g i t ( l e a s t s i g n i f i c a n t d i g it) of nu mb er St e p 3: D i v i d e th e qu o t i e nt of th e p re v i o u s d i v i d e b y the n e w b a se ( Cont i nu e d on ne x t sl i de)
C o nv e rt ing a D e c i mal N umb e r t o a N umb e r o f A n ot h e r Ba se ( Co nti n u ed f r o m pr e v i o u s s li de ..) St e p 4: R e cor d th e r e m a i nd e r f ro m St e p 3 as th e n e x t d i g i t (t o th e l e f t ) o f th e n e w b a s e nu mb er R e p e at St e p s 3 a n d 4 , re c or d i n g re m a i nd er s f r o m r i gh t t o l e f t , un t i l t h e qu o t i e n t b e co m e s z e r o i n St e p 3 N o t e th at th e l a s t re m a ind er thu s n e w o bt a i n e d w il l b e th e m o s t s i g n i f i c a n t d i g it ( M S D) o f th e b a s e nu mb er ( Cont i nu e d on ne x t sl i de)
C o nv e rt ing a D e c i mal A n ot h e r Ba se ( Co nti n u ed f r o m pr e v i o u s s li de ..) N umb e r to a N umb e r o f E xample 95 2 1 = ? 8 S o lu t i o n: 952 8 Re m a ind er s 7 6 1 H e n c e , 95 2 1 = 1 67 8 119 14 1
C o nv e rt ing a N u m b e r o f S o me Ba s e t o a N umb e r o f A n ot h e r Ba se M ethod St e p 1: C o n v er t t h e or i gin a l n u mb er t o a d e c i m a l nu mb e r (b a s e 10) St e p 2 : C o n v er t th e d e c i m al n u mb er s o o bt a i n e d t o th e n e w b a s e nu mb er ( Cont i nu e d on ne x t sl i de)
C o nv e rt ing a N u m b e r o f A n ot h e r Ba se ( Co nti n u ed f r o m pr e v i o u s s li de ..) o f S o me Ba s e to a N umb e r Ex a mp le 545 6 = ? 4 S o l u t i o n: St e p 1: C o n v er t f r o m b a s e 6 t o b a s e 10 5 4 5 6 = 5 x 6 2 + 4 x 6 1 + 5 x 6 = 5 x 3 6 + 4 x 6 + 5 x 1 = 18 + 2 4 + 5 = 20 9 10 ( Cont i nu e d on ne x t sl i de)
C o nv e rt ing a N u m b e r o f S o me o f A n ot h e r Ba se ( Co nti n u ed f r o m pr e v i o u s s li de ..) Ba s e to a N umb e r St e p 2: C o n v e r t 20 9 1 t o b a s e 4 4 R e m a i nd ers 1 1 3 H e n c e , 20 9 1 = 3 10 1 4 S o , 54 5 6 = 20 9 1 = 31 1 4 T hu s , 545 6 = 310 1 4 209 52 13 3
Sh ort c u t M e t h o d f o r C o nv e rt ing a B i na r y N umb e r to i t s E quival e nt Oc t al N umb er M e t h od St e p 1: D i v i d e th e d i g i t s i nt o g ro up s o f th r e e s t a r t i ng f r o m th e r i ght St e p 2: C o n v er t e a c h g ro u p o f th r e e b i n a r y d i g i t s to to o n e o c t al d i g i t u s i ng t h e m e th o d of b i n a r y d e c i m al co n v er s i on ( Cont i nu e d on ne x t sl i de)
Sh ort c u t M e t h o d f o r C o nv e rt ing a B i na r y t o i t s E quival e nt Oc t al N umb er ( Co nti n u ed f r o m pr e v i o u s s li de ..) N umb e r Ex a mp le 1101010 2 = ? 8 S te p 1 : D i v id e t h e bi n ary digit s i n to f r o m r ig ht g r o u p s o f 3 s t a r ti n g 001 101 010 S te p 2 : C o nv e rt e ach g r o u p i n t o o n e o c t al digit 00 1 2 101 2 010 2 = = = 1 x x x 2 2 2 2 2 2 + + + 1 x x x 2 1 2 1 2 1 + + + 1 1 x x x 2 2 2 = = = 1 5 2 H e n c e , 1101010 2 = 152 8
Sh ort c u t M e t h o d f o r C o nv e rt ing an Oc t al N umb e r t o It s E quiva l e nt Bina r y N umb er M e t h od St e p 1: C o n v er t nu mb er d e c i m al e a c h oc t al d i g i t t o a 3 d i g i t b i n a ry (th e o c t al d i g it s m ay b e t r e a t e d as fo r th i s co n v e r s i o n) St e p 2: C o mb i n e a ll th e r e s u l t i ng b i n a r y s i n g l e g ro up s b i n a ry ( o f 3 d i g i t s e a c h) i nt o a nu mb er ( Cont i nu e d on ne x t sl i de)
Sh ort c u t M e t h o d f o r C o nv e rt ing an Oc t al N umb e r t o It s E quiva l e nt Bina r y N umb er ( Co nti n u ed f r o m pr e v i o u s s li de ..) E xample 562 8 St e p = ? 2 1: C o n v e r t e a c h o c t al d i g i t t o 3 b i n a r y d i g i ts 5 8 = 1 1 2 , 6 8 = 1 1 2 , 2 8 = 01 2 St e p 2: C o mb i n e th e bin a r y g r o ups 562 8 = 101 5 110 6 010 2 He n c e , 56 2 8 = 101 1 10 1 2
Sh ort c u t M e t h o d f o r C o nv e rt ing a B i na r y N umb e r t o i t s E q u ival e nt H e xad e c i mal N umb er M e t h od St e p 1: D i v i d e th e b i n a r y d i git s i nt o g ro up s o f fo ur s t a r t i n g f ro m th e r i ght St e p 2: C o mb i n e e a c h g ro u p o f fo ur b i n a r y d i g it s to o n e he xa d e c i m al d i g it ( Cont i nu e d on ne x t sl i de)
Sh ort c u t M e t h o d f o r C o nv e rt ing a B i na r y N umb e r t o i t s E q u ival e nt H e xad e c i mal N umb er ( Co nti n u ed f r o m pr e v i o u s s li de ..) E xample 111101 2 = ? 16 S tep 1 : D i v id e t h e bi n ary digit s i n t o g r o u p s o f f o u r s t ar ti n g f r o m t h e r ig ht 0011 1101 S tep 2 : C o nv e rt e ach g r o u p i n t o a h e x a de c i mal digit 001 1 2 = x 1101 2 = 1 x 2 3 2 3 + x + 1 x 2 2 2 2 + 1 x + 0 x 2 1 2 1 + + 1 1 x x 2 2 = = 3 10 1 3 10 = = 3 16 D 16 H e n c e , 111101 2 = 3D 16
Sh ort c u t M e t h o d f o r C o nv e rt ing a H e xad e cimal N umb e r t o i t s E q u ival e nt Bina r y N u mb er M e t h od St e p 1: C o n v er t th e d e c i m a l e q u i va l e n t o f e a c h h e xa d e c i m al d i g i t t o a 4 d i g i t b i n a r y nu mb er St e p 2: C o mb i n e a l l t h e res u l tin g b i n a r y g ro up s ( of 4 d i g i t s e a c h) in a s ing l e b i n a r y nu mb er ( Cont i nu e d on ne x t sl i de)
Sh ort c u t M e t h o d f o r C o nv e rt ing a H e xad e cimal N umb e r t o i t s E q u ival e nt Bina r y N u mb er ( Co nti n u ed f r o m pr e v i o u s s li de ..) E xample 2A B 1 6 = ? 2 C o n v e r t e a c h h e xa d e c i m al b i n a r y nu mb er St e p 1: d i g i t t o a 4 d i g i t 2 16 A 16 B 16 = = = 2 10 1 10 11 10 = = = 1 2 101 2 1 1 1 2
Sh ort c u t M e t h o d f o r C o nv e rt ing a H e xad e cimal N umb e r to ( Co nti n u ed f r o m pr e v i o u s s li de ..) i t s E q u ival e nt Bina r y N u mb er St e p 2 : C o m bi n e t h e b i n a r y 1010 A g ro u ps 10 11 B 2 A B 1 6 = 10 2 H e n c e , 2 A B 16 = 01 01 1 1 1 1 2
K e y W o r ds / Ph ras es B ase B i n ary B i n ary B it • • • • • • • • Le ast S ig n i f i ca n t D igi t ( L S D) M e m o ry d u mp M o st S ig n i f i ca n t D igi t ( MS D) N o n - po s i t io n al nu m be r s y s tem N u m be r s y s tem Oc t al nu m be r s y s tem • • • • nu m be r poi nt s y s tem D e c i mal nu m be r s y s tem D i v i s io n -R e ma i n d e r Frac tio n al nu m be rs te c hn iq ue • • • H e x a de c i mal nu m be r s y s tem P o s it i o n al nu m be r s y s tem