Difference between revisions of "Programming Club - Tutorials - MATH - Basics"
m (→Addition) |
m (→Counting) |
||
Line 15: | Line 15: | ||
<td style="width:100px; border: 1px solid black;"> | <td style="width:100px; border: 1px solid black;"> | ||
<table style="width:100px; border: 1px solid black;"> | <table style="width:100px; border: 1px solid black;"> | ||
− | <tr><td style="width:100px; border: 1px solid black;"> | + | <tr><td style="width:100px; border: 1px solid black;">D.N.E.</td></tr> |
− | <tr><td style="width:100px; border: 1px solid black;"> | + | <tr><td style="width:100px; border: 1px solid black;">D.N.E.</td></tr> |
− | <tr><td style="width:100px; border: 1px solid black;"> | + | <tr><td style="width:100px; border: 1px solid black;">D.N.E.</td></tr> |
− | <tr><td style="width:100px; border: 1px solid black;"> | + | <tr><td style="width:100px; border: 1px solid black;">D.N.E.</td></tr> |
</table> | </table> | ||
</td> | </td> |
Revision as of 15:41, 24 August 2009
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 |
|
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 10:
101 + 1 = 102