Free Online Tool 한국어
Binary To Hexadecimal Converter
Convert binary to hexadecimal with step-by-step mathematical calculations, reference lookup tables, and code snippets. Free online tool.
Binary To Hexadecimal Calculator
2진수 (Base 2)
00101010
10진수 (Base 10)
42
16진수 (Base 16)
0x2A
8진수 (Base 8)
52
수학적 계산 과정 (단계별 풀이)
42 in Decimal (Base 10)
➔ Binary: 42 = 32 + 8 + 2 = (1 × 2⁵) + (0 × 2⁴) + (1 × 2³) + (0 × 2²) + (1 × 2¹) + (0 × 2⁰) = 101010₂
➔ Hexadecimal: 42 ÷ 16 = 2 remainder 10 ('A') = 0x2A₁₆
➔ Octal: 42 ÷ 8 = 5 remainder 2 = 52₈
유니버설 비트 변환 및 진법 대조 매트릭스
2진수, 16진수, 10진수, 8진수 및 ASCII 문자의 빠른 대응 표.
| 10진수 (Base 10) | 2진수 (Base 2) | 16진수 (Base 16) | 8진수 (Base 8) |
|---|---|---|---|
| 0 | 0000 | 0x0 | 0 |
| 1 | 0001 | 0x1 | 1 |
| 2 | 0010 | 0x2 | 2 |
| 3 | 0011 | 0x3 | 3 |
| 4 | 0100 | 0x4 | 4 |
| 5 | 0101 | 0x5 | 5 |
| 6 | 0110 | 0x6 | 6 |
| 7 | 0111 | 0x7 | 7 |
| 8 | 1000 | 0x8 | 10 |
| 9 | 1001 | 0x9 | 11 |
| 10 | 1010 | 0xA | 12 |
| 11 | 1011 | 0xB | 13 |
| 12 | 1100 | 0xC | 14 |
| 13 | 1101 | 0xD | 15 |
| 14 | 1110 | 0xE | 16 |
| 15 | 1111 | 0xF | 17 |
코드 스니펫
Python
# Convert number across bases
num = 42
print(bin(num)) # Binary: 0b101010
print(hex(num)) # Hex: 0x2a
print(oct(num)) # Octal: 0o52
JavaScript
// Convert number across bases
const num = 42;
console.log(num.toString(2)); // Binary: "101010"
console.log(num.toString(16)); // Hex: "2a"
console.log(num.toString(8)); // Octal: "52"