http://www.mahergelle.com By Eng.Adulahi M. Adan Computer Organization and Architecture
Chapter TWO: - Number System Presentation
Decimal System The decimal system is composed of 10 numerals or symbols. These 10 symbols are 0,1,2,3,4,5,6,7,8,9; using these symbols as digits of a number, we can express any quantity. Example : 3501.51 3 5 1 . 5 1 digit decimal point M ost S ignificant D igit L east S ignificant D igit
Binary System The binary system is composed of 2 numerals or symbols 0 and 1; using these symbols as digits of a number, we can express any quantity. Example : 1101.01 1 1 1 . 1 bit binary point M ost S ignificant B it L east S ignificant B it
Decimal Number Quantity (positional number) 3 5 0 1 (base-10) 1 X 10 = 1 0 X 10 1 = 5 X 10 2 = 500 3 X 10 3 = 3000 3000 + 500 + + 1 = 3501
Decimal-to-Binary Conversion (fractional number) 0 . 4375 0.4375 x 2 = . 8750 0.8750 x 2 = 1 . 75 0.75 x 2 = 1 . 5 0.5 x 2 = 1 . 0.4375 10 = 0.0111 2
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