Hi,
today I will write a post about numeral systems and how they generally work. I already wrote about binary and decimal system, but in the last week I did some research on generally numeral systems.
So, just to recap. We normally use decimal system, this means that we use ten symbols to represent numbers, from 0 to 9. First place of number is the number itself, second position represents the number times 10 because we are in decimal system and 3rd represents number times 100 and so on. The general formula to transfer numbers to decimal system goes like this:
a_{n}b^{n} + a_{n − 1}b^{n − 1} + a_{n − 2}b^{n − 2} + … + a_{0}b^{0}
a stands for the number that we see written, b stands for the system it is written in, n is the digit where a is –> 0 is the first place.
For example 1334 in the numeral system “7” would be:
4*1+3*7+3*49+1*343=515 in decimal system.
Note how you can represent easily any number in any system because of how the exponents rise in every single digit by one. If the numbers before the next digit are all full, like x9999 in decimal system or x4444 in base 5 system you always need to add only one to reach the next digit, this way there are no numbers left out.
What I really like is that if you had a machine that could change from any numeral system to other you could multiply numbers extremely easily. In decimal system if you multiply by 10 it is very easy because you just add one zero, why? Because all the numbers are “multiplied” by 10 with some exponent already and you just add one which moves all of the numbers to left. In binary system if you multiply by two you just move all the numbers by one digit:
101010111*10=1010101110 (10 is 2 in decimal) Or in 6 base system:
420351234*10=4203512340 (10 is 6 in decimal)
You are basically multiplying by “10” though you need to remember that the number is still in that system.
What about rational numbers? The stuff behind point?
I was really wondering about this and Wikipedia helped out! The exponents are simply negative as in the example below (binary number 10.11 to decimal system):
1×2^{1} + 0×2^{0} + 1×2^{−1} + 1×2^{−2} = 2.75
First place –> exponent 0
Second place –> exponent 1
First place behind point –> exponent -1Second place behind point –> exponent -2
Thats it for today.
Dragallur