Saturday 20 October 2012

Arithmetics for Computer



Number System Base

What is a base for number system types?

Actually most of the numbering system will have a base. Each base maximum number just can represent up to single digit or number only.

For example:
-          Binary (Base 2): 0, 1
-          Octal (Base 8): 0, 1, 2, 3, 4, 5, 6, 7
-          Decimal (Base 10): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
-          Hexadecimal (base 16): 0, 1, 2, 3, 4, 5, 7, 8, 9, A, B, C, D, E, F

In general, we can represent numbers in the base,b, as follow :

a = an .bn + an-1 . bn-1 + an-2 . bn-2 +…+ a2 .b2 + a1 .b1 + a0 .b0

a = number ;     n = place of number, nth ;                     b = base ;

Example:
345 change to base 8
345= (3*(82))+(4*(81))+(5*(80))
       =2298


Decimal (Base 10 Integers)
-         An integer in decimal system is a sequence of digits.

-        Value assigned weight is composed by 10 digits starting. Each digit is one of the following:
            0, 1, 2, 3, 4, 5, 6, 7, 8, 9

-          They position weight structure is base on their  positive and negative values to determined .

       …105  104  103  102  101  100        ( positive value )
      102  101  100  10-1  10-2  10-3 …     ( negative value )



 



Binary ( Base 2 Integers )
-          A number in binary system is a sequence of bits, possibly followed by a binary point and then a sequence of bits.

 The contraction of the words ‘binary’ and ‘digit’ is in term of ‘bit’.

-          Number of Base 2 just consists two digit 0 and 1 only.

-          The actual value ( in Base 10 ) represented by the binary number is :


-          The binary number  of weight structure is:

2n-1… 23  22  21  20   .  2-1  2-2 … 2-n
                      Binary | points

-          The size of binary number will able to determined they are Least Significant Bit (LSB) and Most Significant Bits (MSB).


   ( MSB )----100101110----( LSB )



Octal ( Base 8 Integers )
-          The possible number for base 8 is  0, 1, 2, 3, 4, 5, 6, 7

-          The actual value ( in Base 10 ) represented by the octal digit sequence is :



Hexadecimal ( Base 16 Integers )
-          The possible digits in a hexadecimal number are :

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Where A, B, C, D, E, F stand for 10, 11, 12, 13, 14, 15 in decimal respectively.

-          Hexadecimal numbers have the relationship between the Base 2 and Base 16. Sixteen is a power of 2 (16 = 24) .Therefore, four digits in a binary number is equal to a single hexadecimal digit. So that, the conversion between binary and hexadecimal numbers is easy and more suitable to present it by divide them into group which contain 4-bit binary numbers.

-          Each digit in Base 16 position will represent in power of 16.

-          The actual value ( in Base 10 ) represented by the hexadecimal digit sequence:










Ang Kuan Kee B031210344

2 comments:

  1. I like your way present the point~ All arrange it very sequence~ Thanks

    ReplyDelete
  2. Good!! good!! my coa got hope le! ^^

    ReplyDelete