so im learning binary representation for assembly and learned the long division method using this: http://www.wikihow.com/Convert-from-Decimal-to-Binary . ive got it down now (by checking my work with this: http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html my question is, will it work to convert any base to another? could i use it to convert decimal to binary or hex to octal?
No, sorry the division method only works dec to another base (IIRC). I thought you meant if the conversion will work, not specifically the division method (need to read slower)
Division has no base. The "base" property is a result of the divisor on the quotient.
Dividing 10102 by 1012 is the same as dividing A16 by 516 is the same as dividing 10 by 5.
A number is a number is a number.
The idea of base (or radix) is useful in terms of how we humans view numbers.
So, as long as you have a number in some format that you can use to divide it by your radix number, you are good to go. This is particularly useful when you have your number stored in an int, since you can divide an int by any random base you choose easily enough.
int x = 10;
x % 2 = 0; x /= 2 = 5;
x % 2 = 1; x /= 2 = 2;
x % 2 = 0; x /= 2 = 1;
x % 2 = 1; x /= 2 = 0;
↑ binary representation