13.07.2015 Views

Lec 2. (Computer Science) Bit, Byte Bit means 0 or 1 i.e. on or off, it's ...

Lec 2. (Computer Science) Bit, Byte Bit means 0 or 1 i.e. on or off, it's ...

Lec 2. (Computer Science) Bit, Byte Bit means 0 or 1 i.e. on or off, it's ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Base =10 The symbols used are{0,1, 2,3,4,5,6,7,8,9}E.x. value of 29029.98 is:2*10 4 +9*10 3 +0*10 2 +2*10 1 +9*10 0 +9*10 -1 +8*10 -2 Binary system<str<strong>on</strong>g>Computer</str<strong>on</strong>g> uses binary system its base is 2 and it c<strong>on</strong>tain <strong>on</strong>ly 0 <str<strong>on</strong>g>or</str<strong>on</strong>g> 1(<strong>on</strong> <str<strong>on</strong>g>or</str<strong>on</strong>g> <strong>off</strong>)In binary system each rank weight twice its right neighb<str<strong>on</strong>g>or</str<strong>on</strong>g> in this way rankweights from left to right is 1, 2, 4, 8, 16 and so <strong>on</strong>. Base =2 The symbols used are {0,1}C<strong>on</strong>verting from any system to decimal:-We can use equati<strong>on</strong> (1) to c<strong>on</strong>vert the number in any system to decimale.x. C<strong>on</strong>vert (110101.1101) 2 to decimalSol.Using equati<strong>on</strong> 1a n-1 b n-1 +a n-2 b n-2 ... +a 1 b 1 + a 0 b 0 + a -1 b -1 + a -2 b -2 +…+ a -m b -m Eqn. (1)110101.1101 = a 5 a 4 a 3 a 2 a 1 a 0 . a -1 a -2 a -3 a -4 , n=6 , m=4a 5 b 5 +a 4 b 4 + a 3 b 3 +a 2 b 2 +a 1 b 1 + a 0 b 0 + a -1 b -1 + a -2 b -2 + a -3 b -3 +a -4 b -4f<str<strong>on</strong>g>or</str<strong>on</strong>g> binary system base =2 then b=21*2 5 +1*2 4 + 0*2 3 +1*2 2 +0*2 1 + 1* 2 0 + 1*2 -1 + 1* 2 -2 + 0*2 -3 +1*2 -4=32+16+0+4+0+1+0.5+0.25+0+0.0625=53.8125E.x. c<strong>on</strong>vert (11001.101) 2 to decimalSoluti<strong>on</strong>:1*2 4 +1*2 3 +0*2 2 +0*2 1 +1*2 0 +1*2 -1 +0*2 -2 +1*2 -3 =16+8+0+0+1+1/2+0+1/8=(25.625) 10e.x.The value of (10101.01) 2 in decimal system is1*2 4 +0*2 3 +1*2 2 +0*2 1 +1*2 0 +0*2 -1 +1*2 -2 =21.252

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!