CryptrotTheWarlock wrote: » You treat it as _integer_ division. You do not carry forward the remainder each time, in this case / is division and % is what's caled modulus (the remainder when dividing in integers). So 125/2 = 62 (You're only looking at the integer result) and then 125%2 = 1 (This gets you your remainder of 1). 500/2 = 250, 500%2 = 0 -> 0 250/2 = 125, 250%2 = 0 -> 0 125/2 = 62, 125%2 = 1 -> 1 62/2 = 31, 62%2 = 0 -> 0 31/2 = 15, 31%2 = 1 -> 1 15/2 = 7, 15%2 = 1 -> 1 7/2 = 3, 7%2 = 1 -> 1 3/2 = 1, 3%2 = 1 -> 1 1/2 = 0, 1%2 = 1 -> 1 Now you take the numbers and work your way from bottom up, in this case 500(base10) is 111110100(base2). If you think back to grade school before you knew what decimals and fractions were you were probably taught intger division with the R for remainder notation, it's the exact same concept here. You can _only_ have a remainder of 1 or 0 when dividing by 2 and that remainder is what gives you the value in the new base. I'm sorry if I am explaining this oddly, but it's much easier to just work through one or two. This works for other bases as well (e.g. you can convert a number from base 10 to base 8 by dividing by 8 and using the remainders for the new digits) I guess the important thing is don't use 62.5 in your next operation, use 62. Don't look at 125/2 as 62.5 think of it as 62R1 and the R1 is what gives you the binary digit (or bit) for that field and 62 is what you bring forward (the next bit is a 0 since 62/2 = 31R0 which is where you went wrong).
scaredoftests wrote: » Being a dyslexic, my brain is exploding. LOL