How do you represent the (decimal) integer 50 in, oh, "hexadecimal," otherwise known as base-16? Recall that decimal is simply base-10, and binary is simply base-2. Infer from those base systems how to represent this one!
When we write a number down, say "50", in decimal, we really mean: 50 = 5 × 10 + 0 × 1 (5 in the tens place, and 0 in units). We can write each place as a power of ten: 50 = 5 × 10^1 + 0 × 10^0 Similarly for hexadecimal and binary, but then using powers of 16 and 2 respectively. We need to find the digits of the hexadecimal form. Or in other words, we need to find a and b: 50 = a × 16 + b × 1 Simply divide 50 by 16 will get you a with some remainder, which is a multiple in units, and thus b: 50 / 16 = 3 (=a), remainder 2. [2 / 1 = 2 (=b), remainder 0] Thus 50 in hexadecimal is "32". For binary, we need to do the division a couple of times more to find all digits. 50 = a × 32 + b × 16 + c × 8 + d × 4 + e × 2 + f × 1 50 / 32 = 1 (=a), remainder 18 18 / 16 = 1 (=b), remainder 2 2 / 8 = 0 (=c), remainder 2 2 / 4 = 0 (=d), remainder 2 2 / 2 = 1 (=e), remainder 0 [0 / 1 = 0 (=f), remainder 0] We find that 50 in binary is "110010".
This is the same answer from this type of question I answered a few years ago on yahoo.
Join our real-time social learning platform and learn together with your friends!