The rules
Every base writes numbers with place values that are powers of the base. In binary the places are 1, 2, 4, 8, 16 and so on, so 1101 is 8 + 4 + 1 = 13. Hexadecimal uses the digits 0 to 9 and A to F for 10 to 15, so FF is 15 × 16 + 15 = 255.
The converter uses whole-number arithmetic with no rounding, so values with hundreds of digits are converted exactly.