Friday, 7 December 2012

Data Representation:Number System


By on 09:51

Those who read this post then definitely he/she already know decimal number system.Decimal Number System?????Don't be confused I mean 0,1,2,3,4.......9.But we are computer guys,the computer knows binary no. system like 0 and 1.So in this post I explain how no. in one no. system are convert into another no. system. 


Number System Base  Range/Value/numbers
Binary No. System  2  0,1
Octal No. System  8  0-7
Decimal No. System  10  0-9
Hex-decimal No. System  16  0-15


Binary Number System:-Binary no. system consist 0 and 1.It has a base 2(also called as radix 2).

Decimal Number      It's Binary(Hexadecimal)
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001....up t0 1111(14)


Decimal Number     It's Binary(Octal)
0000
1001
2010
3011
4100
5101
6110
7111


Decimal to Binary Conversion:-

Example:-(125)10=(?)2


2|125

  2|62|1
    2|31|0
      2|15|1
         2|7|1
           2|3|1
             2|1|0
               2|0|1
=1011101(count in reverse order) is the binary of 125.


Decimal to Octal:-



Example:-(159)10=(?)8

8|159

  8|19|6
      8|2|3
         8|0|2

=236 

Decimal to Hexadecimal:-


Number Hexadecimal
0-9 0-9(same)
10 A
11 B
12 C
13 D
14 E
15 F



Example:-(159)10=(?)16

16|159
    16|9|15
        16|0|9

=9F       where F=15

Binary to decimal:-

Example:-(111101111)2=(?)10

1        1        1        1        0        1        1        1        1   

2^8*1       2^7*1         2^6*1         2^5*1            2^4*0            2^31            2^2*1          2^1*1              2^0*1

=495

Octal to binary:-

Example:-(54.50)8=(?)10

5               4              .               5               0


5#8^1                        4#8^0                                                     5#8^-1                       0#8^-2



=44.62

Hexadecimal to Decimal:-

Example:-(1E.25)16=(?)10=

1               E               .               2               5

1*16^1                    14*16^0                                                        2*16^-1                     5*16^-2

=69.32  

Binary to Octal:-

Example:-(111110111)2=(?)8

1  1  1    1  1  0     1  1  1
--------  --------    --------
 =7          =6           =7

=767

Octal to binary:-

Example:-(125)8=(?)2=

1                  2                  5

001                              010                                 101

=001010101

Binary to hexadecimal:-

Example:-(1110111111010011)2=(?)16=

1110     1111      1101     0011
-----      -----       ------     ------
=13         14           12         3

=EFC3

Octal to Hexadecimal:-

Example:-(65)8=(?)16=

  6                                        5

0011                                0101
=3                                     =5

=35

Hexadecimal to Octal:-

Example:-(1EA.E9)16=(?)8=

=(1111111010.111010010)2=

=(762.722)



If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...