Convierte números decimales a formato hexadecimal usando el método de división repetida. Esencial para programación y desarrollo web.
Comienza con el número decimal que quieres convertir
Divide el número por 16 y registra el cociente y el resto
Convierte el resto a su equivalente hexadecimal (0-9, A-F)
Continúa dividiendo el cociente por 16 hasta obtener 0
El equivalente hexadecimal son los restos leídos en orden inverso
65029 ÷ 16 = 4064 remainder 5 → 5
4064 ÷ 16 = 254 remainder 0 → 0
254 ÷ 16 = 15 remainder 14 → E
15 ÷ 16 = 0 remainder 15 → F
Leyendo restos de abajo hacia arriba: FE05₁₆
hex(255) # Returns '0xff'
format(255, 'X') # Returns 'FF' 255.toString(16) 255.toString(16).toUpperCase() Integer.toHexString(255) String.format("%X", 255)
Español