Number 42 in hexadecimal

Decimal to hex converter
Decimal Number to convert

What is number 42 in hex?

Answer

Decimal number 42 in hexadecimal is
2A

0x2A in code · 2 hex digits

Base 16: digits 0–9 and A–F (A = 10 … F = 15); each place is worth a power of 16.

Divide by 16, keep the remainder
divisionquotientremainder
42 ÷ 16210 = A
2 ÷ 1602

↑ Read the remainders from bottom to top: 2A

See Also

FAQ

What is number 42 in hex?

Decimal number 42 in hexadecimal is 2A

What is 42 in binary?

42 in binary is 101010: each hex digit of 2A is 4 bits — 2 = 0010, A = 1010.

How is 42 written in code?

In code (C, JavaScript, Python) hexadecimal 2A is written with the 0x prefix: 0x2A.