Arithemic Bases
Results 1 to 5 of 5

Thread: Arithemic Bases

  1. #1
    Banned
    Join Date
    Jun 2002
    Posts
    45

    Talking Arithemic Bases

    Can anyone fully understand this? (some of the writing is off line)

    A Primer on Arithmetic in Bases Other Than 10
    The ordinary arithmetic problems we're used to seeing are all based on decimal (or base-10) numbers, but systems using a base other than 10 are possible. In all systems, the position of a digit in a number determines the value it contributes; for example, the base-10 number 2347 represents an implied addition problem:


    2347 (10) = 2 x 1000

    + 3 x 100

    + 4 x 10

    + 7 x 1

    Here we've included "(10)" after the number to emphasize that base 10 is being used. Note that the value multiplied by each digit increases by a factor of 10 as you move each position to the left, with the rightmost digit always representing ones. This use of the base to distinguish the role of each digit in a number is the key to understanding arithmetic in all bases. For example, the same sequence of digits in base 8 (octal) would translate to


    2347 (8) = 2 x 512

    + 3 x 64

    + 4 x 8

    + 7 x 1



    = 1255 (10)

    Again, note that the value multiplied by each digit increases by a factor of 8 (the base) as you move each position to the left. These multipliers are referred to as powers of the base; for example,


    Base 10 Base 8



    10 = 10 8 = 8

    100 = 10 x 10 64 = 8 x 8

    1000 = 10 x 10 x 10 512 = 8 x 8 x 8



    etc.

    As seen in the conversion above, it's fairly easy to translate a non-decimal number into base 10, but the opposite conversion is a bit trickier. The procedure can best be illustrated by means of a specific problem, for example converting the decimal number 1255 (10) into base 8.

    First, we begin by finding the largest power of the base present in the starting number. Since 8 x 8 x 8 x 8 = 4096 (10) is larger than 1255 (10), we next try 8 x 8 x 8 = 512 (10), which does factor at least once into 1255 (10):


    1255 = 2 x 512 + remainder

    In fact, 2 multiples of 512 (10) can be found in 1255 (10) - this 2 then becomes the first digit in our base-8 equivalent.

    To find the next base-8 digit, start by removing the effect of the first digit, which changes the starting number from 1255 (10) to 231 (10):


    1255 - 2 x 512 = 231

    The procedure is repeated with the new starting number and the next smaller power of 8 to come up with the second base-8 digit:


    231 = 3 x 64 + remainder

    Continuing the process eventually results in the definition of all base-8 digits:


    1255 (10) = 2 x 512

    + 3 x 64

    + 4 x 8

    + 7 x 1



    = 2347 (8)

    Any single digit in a number can never be as large as the base - the maximum digit in a decimal number is 9, and the maximum in a base-8 number is 7. For bases larger than 10, we must introduce other symbols for values above 9 - letters are usually the convention. In base 16 (hexadecimal), we have the possible digits


    0 1 2 3 4 5 6 7 8 9 A B C D E F

    For example, C (16) is equivalent to 12 (10).

    Unless you have a translating calculator or other aid, it's usually easiest to solve complex arithmetic problems in non-decimal bases by first converting all numbers to base 10, performing the arithmetic, then converting the answer back to the desired base. For simple addition problems, an analog of the decimal columnar method may be used; for example in base 8,


    1 <--- carry digit 5 3 + 2 7 1 0 2
    Here are some examples of arithmetic problems in various bases:


    Base 3 Decimal Equivalent



    1 + 2 = 10 1 + 2 = 3



    10 - 1 = 2 3 - 1 = 2



    21 + 12 = 110 7 + 5 = 12



    21 - 12 = 2 7 - 5 = 2



    1201 - 111 = 120 46 - 13 = 33





    Base 8 Decimal Equivalent



    2 + 4 = 6 2 + 4 = 6



    7 - 2 = 5 7 - 2 = 5



    53 + 27 = 102 43 + 23 = 66



    52 - 41 = 11 42 - 33 = 9



    13053 + 17345 = 32420 5675 + 7909 = 13584





    Base 16 Decimal Equivalent



    A + 4 = E 10 + 4 = 14



    D - B = 2 13 - 11 = 2



    24 + 12 = 36 36 + 18 = 54



    FF - AA = 55 255 - 170 = 85



    1F40 + 5A8F = 79CF 8000 + 23183 = 31183

  2. #2
    Senior Member
    Join Date
    Jun 2002
    Posts
    165
    in my opinion it's poorly written as the octal and hexidecimal number representations should have been denoted appropriately for clarification (especially in cases where they are used with equality operators).

    are you wanting an explanation of numbering systems outside of base10 or a summary of what was presented above?
    -droby10

  3. #3
    Banned
    Join Date
    Jun 2002
    Posts
    45
    well, to tell you the truth, this is for a game im trying to beat, its full of puzzles ect. anyway, this is like a walkthrough but as you say, its written poorly and even i only understand part of it.

  4. #4
    Senior Member
    Join Date
    Jun 2002
    Posts
    165
    i don't know if this will make any more sense, but i'll give it a shot.

    the easiest way to explain this is through numeric grouping (multiplication).

    for any number (xyz) of base n, the number can be converted to a decimal (base10) representation as follows:

    ( ( ( x ) * n ) + y ) * n ) + z


    the notation is standard as follows:
    decimal notation: no change
    octal notation: \#
    hexidecimal notation: \x#

    using a base10 number as a proof we'll use the number 123.
    (1 group of 10's * 10 + 2 groups of 10's + 3)

    = ( ( ( 1 ) * 10 ) + 2 ) * 10 ) + 3
    = ( ( 10 ) + 2 ) * 10 ) + 3
    = ( 12 * 10 ) + 3
    = 120 + 3
    = 123

    if we used \123 (base8, octal) then it would be:
    (1 group of 8's * 8 + 2 groups of 8 + 3)

    = ( ( ( 1 ) * 8 ) + 2 ) * 8 ) + 3
    = ( ( 8 ) + 2 ) * 8 ) + 3
    = ( 10 * 8 ) + 3
    = 80 + 3
    = 83

    and if we used \x123 (hexidecimal, base16) then it would solve as:
    (1 group of 16's * 16 + 2 groups of 16 + 3)

    = ( ( ( 1 ) * 16 ) + 2 ) * 16 ) + 3
    = ( ( 16 + 2 ) * 16 ) + 3
    = ( 18 * 16 ) + 3
    = 288 + 3
    = 291

    this pattern can be applied to any length of digits (we just used 3 in 123, \123, and \x123 as a standard for illustration). in cases where the base exceeds the natural base10 (ie. hexidecimal), alpha characters are used as numeric representation. so in hexidecimal you have the numbering scheme of:

    0=0
    1=1
    2=2
    3=3
    4=4
    5=5
    6=6
    7=7
    8=8
    9=9
    a=10
    b=11
    c=12
    d=13
    e=14
    f=15

    so base16 is defined as a number represented with values in the range of [0-f].

    the number \xc4 can then be solved as:
    (c or 12 groups of 16 + 4)

    = ( ( c ) * 16 ) + 4
    = ( ( 12 * 16 ) + 4
    = ( ( 192 ) + 4
    = 196

    or reversed for clarity the base16 number \x4c:
    (4 groups of 16 + c or 12)
    = ( ( 4 ) * 16 ) + c )
    = ( 4 * 16 ) + 12 )
    = 64 + 12
    = 76


    another thing to point out that may help clarification is noting the rolling values:

    for a decimal representation we roll between 9 and 0:
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,...


    for an octal notation we roll between \7 and \0:
    0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, ...


    for a hexidecimal notation we roll between \xf(15) and \x0:
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1a, 1b, 1c, 1d, 1e, 1f, 20, 21,...
    -droby10

  5. #5
    Senior Member
    Join Date
    Apr 2002
    Posts
    889
    I'm still attempting to figure out #9 (from the 70's Beatles I think a song part of it repeating #9. Anyway no matter how many times you X it then add the answer it always equals 9? Humm then there is the beach sand thing
    I believe that one of the characteristics of the human race - possibly the one that is primarily responsible for its course of evolution - is that it has grown by creatively responding to failure.- Glen Seaborg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •