Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
NumberSystemsBinarySystem NumberSystem • Number • Itisasymbolrepresen2ngaunitorquan2ty. • NumberSystem • Definesasetofsymbolsusedtorepresentquan2ty • Radix • Thebaseorradixofnumbersystemdetermineshowmany numericaldigitsthenumbersystemuses. TypesofNumberSystem • • • • DecimalSystem BinaryNumberSystem OctalNumberSystem HexadecimalNumberSystem DecimalNumberSystem • Ingeniousmethodofexpressingallnumbersbymeansoftens symbols originated from India. It is widely used and is based onthetenfingersofahumanbeing. • Itmakesuseoftennumericsymbols • 0,1,2,3,4,5,6,7,8,9 InherentValueandPositionalValue • Theinherentvalueofasymbolisthevalueofthat symbolstandingalone. • Example6innumber256,165,698 • Thesymbolisrelatedtothequan2tysix,evenifitisused indifferentnumberposi2ons • Theposi2onalvalueofanumericsymbolis directlyrelatedtothebaseofasystem. • Inthecaseofdecimalsystem,eachposi2onhasa valueof102mesgreaterthattheposi2ontoitsright. Example:423,thesymbol3representstheones(units),the symbol2representsthetensposi2on(10x1),andthesymbol 4representsthehundredsposi2on(10x10).Inotherwords, eachsymbolmovetotheleVrepresentsanincreaseinthe valueoftheposi2onbyafactoroften. InherentandPositionalValuecont. 2539=2X1000+5X100+3X10+9X1 =2X103+5X102+3X101+9x100 Thismeansthatposi2onalvalueofsymbol2is1000orusingthe base10itis103 BinaryNumberSystem • Usesonlytwonumericsymbols1and0 • Underthebinarysystem,eachposi2onhasavalue22mes greaterthantheposi2ontotheright. OctalNumberSystem • Octal number system is using 8 digits to represent numbers. Thehighestvalue=7.Eachcolumnrepresentsapowerof8. Octalnumbersarerepresentedwiththesuffix8. HexadecimalNumberSystem • Providesanotherconvenientandsimplemethodfor expressingvaluesrepresentedbybinarynumerals. • Itusesabase,orradix,of16andtheplacevaluesarethe powersof16. Decimal Binary Hexadecimal Decimal Binary Hexadecimal 0 0000 0 8 1000 8 1 0001 1 9 1001 9 2 0010 2 10 1010 A 3 0011 3 11 1011 B 4 0100 4 12 1100 C 5 0101 5 13 1101 D 6 0110 6 14 1110 E 7 0111 7 15 1111 F RadixConversion • Theprocessofconver2ngabasetoanother. • Toconvertadecimalnumbertoanyothernumbersystem, dividethedecimalnumberbythebaseofthedes2na2on numbersystem.Repeattheprocessun2lthequo2ent becomeszero.Andnotedowntheremaindersinthereverse order. • Toconvertfromanyothernumbersystemtodecimal,take theposi2onalvalue,mul2plybythedigitandadd. RadixConversion RadixConversion DecimaltoBinaryConversion ofFractions • Division–Mul2plica2onMethod • Stepstobefollowed • Mul2plythedecimalfrac2onby2andno2ngtheintegralpartofthe product • Con2nuetomul2plyby2aslongastheresul2ngproductisnot equaltozero. • Whentheobtainedproductisequaltozero,thebinaryofthe numberconsistsoftheintegralpartlistedfromtoptobocominthe ordertheywererecorded. • Example1:Convert0.375toitsbinaryequivalent Multiplication Product Integral part 0.375 x 2 0.75 0 0.75 x 2 1.5 1 0.5 x 2 1.0 0.37510 is equivalent to 0.0112 1 Exercises • Convertthefollowingdecimalnumbersintobinaryand hexadecimalnumbers: 1. 2. 128 207 • Convertthefollowingbinarynumbersintodecimaland hexadecimalnumbers: 1. 2. 11111000 1110110 Exercises • Convertthenumberinbinary(110110)intooctalandhex format. • Inoctal(base8) • InHexadecimal(base16) • Convertthenumberinbinary(1110110)intooctalandhex format. • Inoctal(base8) • InHexadecimal(base16) Exercises • Convertdecimal12.75tobinaryrepresenta2on • Convertbinarynumber1010.0011intodecimal representa2on FastConversion BinarytoPowerof2Base • Ifyouhaveabinarynumbertobeconvertedintobasewhich ispowerof2, • Splitthenumberinagroupbeginningfromtherightbythefactor ofpower«n»(2n) • Thenconvertthebinarygroupdirectlytothepowerof2base • Example • (100110010)2=(……)8 • (1100110)2=(……)8 FastConversion BinarytoPowerof2Base • Examples • (10110010)2=(……)16 • (1100110)2=(……)16 FastConversion Powerof2BasetoBinary • Ifyouhaveanumber,whichisapowerof2,tobeconverted intobasetwo, • Spliteachdigitofthenumber, • Thenconverteahdigitdirectlytobinarynumberwithndigits • Wherenisthepowerfactor • Examples • (53227)8=(……)2 • (125)8=(……)2 • (AD2)16=(……)2 • (C3)16=(……)2 • WhataboutOctaltoHex Conversion • Examples • (125)8=(……)16 • (125)16=(……)8 THANKSFORYOUR ATTENTION!