Difference between revisions of "Programming Club - Tutorials - MATH - Basics"
(→Counting) |
m (→Arithmetic) |
||
Line 131: | Line 131: | ||
Different based maths have numerous advantages, and can also help you gain a better general understanding of mathematics. | Different based maths have numerous advantages, and can also help you gain a better general understanding of mathematics. | ||
+ | |||
+ | |||
+ | |||
+ | ===Irrational/Fractional Numbers=== | ||
+ | <math>\sum_{i=-m}^n-1 b_i * k^i</math> | ||
+ | |||
+ | |||
===Addition=== | ===Addition=== | ||
Line 179: | Line 186: | ||
===Exponents=== | ===Exponents=== | ||
===Roots=== | ===Roots=== | ||
− |
Revision as of 22:26, 2 February 2010
Contents
Arithmetic
Counting
In mathematical problems, there is a difference between the way you count numbers and values. In simple base 10 math, the methods appear to be the same; However, if you intend to use an alternative base for your mathematical problems, you can immediately see the difference.
A numerical representation for a value, is divided into exponents according to it's base. For example, in base 10 math, the digits representing values are read from right to left as ones, tens, hundreds, thousands, etc. - which are all multiples of 10.
In base two math, they read from right to left as ones, twos, fours, eights. Similarly, base three math reads ones, threes, nines, twenty-sevens, etc.
The following table illustrates the four basic digits that represent values for each base up to ten.
Base One |
|
Base Two |
|
Base Three |
|
Base Four |
|
Base Five |
|
||||||||||||||||||||
Base Six |
|
Base Seven |
|
Base Eight |
|
Base Nine |
|
Base Ten |
|
Knowing how to compute in different bases is very useful in understanding math, and is actually used in everyday life.
For example:
Base Two | Computers use base 2 to compute binary. | Base Twelve | A single year is equivalent to 12 months. Thus, years are counted in base 12. | Base Twenty-Four | Days are counted in base 24 (1 day == 24 hours). |
Different based maths have numerous advantages, and can also help you gain a better general understanding of mathematics.
Irrational/Fractional Numbers
<math>\sum_{i=-m}^n-1 b_i * k^i</math>
Addition
Addition, like all mathematical operations, is not dependent on the base you are using. To perform addition, you simply count inside of a placeholder until it carries over into the next place.
For example:
Base 2:
101 + 1 = 110 (5 + 1 = 6)
Because base 2 math only allows 1's and zeros, you must carry over any remaining digits.
Base 8:
107 + 1 = 110 (71 + 1 = 72)
Because base 8 math only allows for numbers up to 8, you must carry over any remaining digits.
Base 10:
109 + 1 = 110
Subtraction
Subtraction is always the same despite the base that you are using. Subtraction is simple the inverse of addition. Rather than adding a positive number, you are adding a negative number - you are removing a number.
So, here is an example of how to achieve this in base 2, 8, and 10:
Base 2:
100 - 1 = 11 (4 - 1 = 3)
Because base 2 math only allows 1's and zeros, you must borrow any remaining digits.
Base 8:
100 - 1 = 77 (64 - 1 = 63)
Because base 8 math only allows for numbers up to 8, you must borrow any remaining digits.
Base 10:
100 - 1 = 99