23
Number Systems- Binary System

Number Systems- Binary System · 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. Radix Conversion

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Number Systems- Binary System · 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. Radix Conversion

NumberSystems-BinarySystem

Page 2: Number Systems- Binary System · 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. Radix Conversion

NumberSystem•  Number•  Itisasymbolrepresen2ngaunitorquan2ty.

•  NumberSystem•  Definesasetofsymbolsusedtorepresentquan2ty

•  Radix•  Thebaseorradixofnumbersystemdetermineshowmanynumericaldigitsthenumbersystemuses.

Page 3: Number Systems- Binary System · 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. Radix Conversion

TypesofNumberSystem•  DecimalSystem•  BinaryNumberSystem•  OctalNumberSystem•  HexadecimalNumberSystem

Page 4: Number Systems- Binary System · 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. Radix Conversion

DecimalNumberSystem•  Ingeniousmethodofexpressingallnumbersbymeansoftenssymbolsoriginated from India. It iswidelyusedand isbasedonthetenfingersofahumanbeing.

•  Itmakesuseoftennumericsymbols•  0,1,2,3,4,5,6,7,8,9

Page 5: Number Systems- Binary System · 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. Radix Conversion

InherentValueandPositionalValue

•  Theinherentvalueofasymbolisthevalueofthatsymbolstandingalone.•  Example6innumber256,165,698•  Thesymbolisrelatedtothequan2tysix,evenifitisusedindifferentnumberposi2ons

•  Theposi2onalvalueofanumericsymbolisdirectlyrelatedtothebaseofasystem.•  Inthecaseofdecimalsystem,eachposi2onhasavalueof102mesgreaterthattheposi2ontoitsright.Example:423,thesymbol3representstheones(units),thesymbol2representsthetensposi2on(10x1),andthesymbol4representsthehundredsposi2on(10x10).Inotherwords,eachsymbolmovetotheleVrepresentsanincreaseinthevalueoftheposi2onbyafactoroften.

Page 6: Number Systems- Binary System · 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. Radix Conversion

InherentandPositionalValuecont.

2539=2X1000+5X100+3X10+9X1=2X103+5X102+3X101+9x100

Thismeansthatposi2onalvalueofsymbol2is1000orusingthebase10itis103

Page 7: Number Systems- Binary System · 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. Radix Conversion

BinaryNumberSystem•  Usesonlytwonumericsymbols1and0•  Underthebinarysystem,eachposi2onhasavalue22mesgreaterthantheposi2ontotheright.

Page 8: Number Systems- Binary System · 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. Radix Conversion

OctalNumberSystem•  Octalnumber system isusing8digits to representnumbers.Thehighestvalue=7.Eachcolumnrepresentsapowerof8.Octalnumbersarerepresentedwiththesuffix8.

Page 9: Number Systems- Binary System · 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. Radix Conversion

HexadecimalNumberSystem•  Providesanotherconvenientandsimplemethodforexpressingvaluesrepresentedbybinarynumerals.

•  Itusesabase,orradix,of16andtheplacevaluesarethepowersof16.

Page 10: Number Systems- Binary System · 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. Radix Conversion

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

Page 11: Number Systems- Binary System · 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. Radix Conversion

RadixConversion•  Theprocessofconver2ngabasetoanother.•  Toconvertadecimalnumbertoanyothernumbersystem,dividethedecimalnumberbythebaseofthedes2na2onnumbersystem.Repeattheprocessun2lthequo2entbecomeszero.Andnotedowntheremaindersinthereverseorder.

•  Toconvertfromanyothernumbersystemtodecimal,taketheposi2onalvalue,mul2plybythedigitandadd.

Page 12: Number Systems- Binary System · 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. Radix Conversion

RadixConversion

Page 13: Number Systems- Binary System · 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. Radix Conversion

RadixConversion

Page 14: Number Systems- Binary System · 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. Radix Conversion

DecimaltoBinaryConversionofFractions•  Division–Mul2plica2onMethod•  Stepstobefollowed

•  Mul2plythedecimalfrac2onby2andno2ngtheintegralpartoftheproduct

•  Con2nuetomul2plyby2aslongastheresul2ngproductisnotequaltozero.

•  Whentheobtainedproductisequaltozero,thebinaryofthenumberconsistsoftheintegralpartlistedfromtoptobocomintheordertheywererecorded.

Page 15: Number Systems- Binary System · 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. Radix Conversion

•  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 1

0.37510 is equivalent to 0.0112

Page 16: Number Systems- Binary System · 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. Radix Conversion

Exercises•  Convertthefollowingdecimalnumbersintobinaryandhexadecimalnumbers:1.  1282.  207

•  Convertthefollowingbinarynumbersintodecimalandhexadecimalnumbers:1.  111110002.  1110110

Page 17: Number Systems- Binary System · 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. Radix Conversion

Exercises•  Convertthenumberinbinary(110110)intooctalandhexformat.•  Inoctal(base8)•  InHexadecimal(base16)

•  Convertthenumberinbinary(1110110)intooctalandhexformat.•  Inoctal(base8)•  InHexadecimal(base16)

Page 18: Number Systems- Binary System · 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. Radix Conversion

Exercises•  Convertdecimal12.75tobinaryrepresenta2on

•  Convertbinarynumber1010.0011intodecimalrepresenta2on

Page 19: Number Systems- Binary System · 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. Radix Conversion

FastConversionBinarytoPowerof2Base•  Ifyouhaveabinarynumbertobeconvertedintobasewhichispowerof2,•  Splitthenumberinagroupbeginningfromtherightbythefactorofpower«n»(2n)

•  Thenconvertthebinarygroupdirectlytothepowerof2base

•  Example

•  (100110010)2=(……)8•  (1100110)2=(……)8

Page 20: Number Systems- Binary System · 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. Radix Conversion

FastConversionBinarytoPowerof2Base

•  Examples

•  (10110010)2=(……)16•  (1100110)2=(……)16

Page 21: Number Systems- Binary System · 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. Radix Conversion

FastConversionPowerof2BasetoBinary•  Ifyouhaveanumber,whichisapowerof2,tobeconvertedintobasetwo,•  Spliteachdigitofthenumber,•  Thenconverteahdigitdirectlytobinarynumberwithndigits

•  Wherenisthepowerfactor

•  Examples

•  (53227)8=(……)2•  (125)8=(……)2•  (AD2)16=(……)2•  (C3)16=(……)2• 

Page 22: Number Systems- Binary System · 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. Radix Conversion

WhataboutOctaltoHexConversion• Examples• (125)8=(……)16• (125)16=(……)8

Page 23: Number Systems- Binary System · 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. Radix Conversion

THANKSFORYOURATTENTION!