Free Online Tool 简体中文

Signed Binary To Decimal Converter

Convert signed binary to decimal with step-by-step mathematical calculations, reference lookup tables, and code snippets. Free online tool.

Signed Binary To Decimal Calculator

二进制 (Base 2)
十进制 (Base 10)
42
十六进制 (Base 16)
0x2A
八进制 (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₈

通用位转换与数字对照矩阵

二进制、十六进制、十进制、八进制和 ASCII 字符的通用快速对照表。

十进制 (Base 10) 二进制 (Base 2) 十六进制 (Base 16) 八进制 (Base 8)
0 0x0 0
1 0x1 1
2 0x2 2
3 0x3 3
4 0x4 4
5 0x5 5
6 0x6 6
7 0x7 7
8 0x8 10
9 0x9 11
10 0xA 12
11 0xB 13
12 0xC 14
13 0xD 15
14 0xE 16
15 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"