Enter Value
Formula & Method
Key relationships used in this tool:
- Binary → Decimal: If the bits are \(b_{n-1}\dots b_1 b_0\), the value is ∑i=0..n-1 bi·2i.
- Decimal → Binary: Repeatedly divide by 2 and collect remainders (or use base conversion).
- Hex ↔ Binary: 1 hex digit = 4 bits. Group binary in nibbles to map directly.
- Two’s Complement (signed n-bit): Unsigned range is 0 .. 2n−1; signed range is −2n−1 .. 2n−1−1. If the most significant bit is 1, the signed value equals unsigned − 2n.
- Clamping: All conversions are reduced modulo 2n to honor the selected word size.
Conversion History
| Timestamp | Base | Input | Word | Signed | Binary | Dec Unsigned | Dec Signed | Hex | Oct |
|---|---|---|---|---|---|---|---|---|---|
| No conversions yet. | |||||||||
Example Data
Sample 8‑bit conversions for quick reference.
| Decimal | Binary | Hex | Octal | Signed (8‑bit) |
|---|---|---|---|---|
| 5 | 0101 | 5 | 5 | 5 |
| 15 | 1111 | F | 17 | 15 |
| 31 | 0001 1111 | 1F | 37 | 31 |
| 64 | 0100 0000 | 40 | 100 | 64 |
| 127 | 0111 1111 | 7F | 177 | 127 |
| 128 | 1000 0000 | 80 | 200 | -128 |
| 200 | 1100 1000 | C8 | 310 | -56 |
| 255 | 1111 1111 | FF | 377 | -1 |
Tip: Use the Signed switch with a word size to interpret the same bit pattern as positive or negative using two’s complement.