About the Binary Hex Decimal Converter
What is the Binary Hex Decimal Converter?
Programmers switch between binary, hex and decimal constantly. This binary hex decimal converter shows all four common bases at once.
Prefixes such as 0x, 0b and 0o are stripped automatically.
How to use the Binary Hex Decimal Converter
- Number (sample: 2F)
- Input Is (sample: Hexadecimal)
- Press Convert (results also refresh as you type). The result card shows the Decimal, along with Binary, Octal, Hexadecimal and Bits needed.
Formula used
Each hex digit = 4 bits; each octal digit = 3 bits
- Bits needed = length of the binary form
- Bytes needed = bits ÷ 8, rounded up
Worked example
These are the sample values already filled in the calculator above, and the result it returns for them:
| Input | Sample value |
|---|---|
| Number | 2F |
| Input Is | Hexadecimal |
| Result | Value |
|---|---|
| Decimal | 47 |
| Binary | 101111 |
| Octal | 57 |
| Hexadecimal | 2F |
| Bits needed | 6 |
| Bytes needed | 1 |
Tips for using the Binary Hex Decimal Converter
- Group binary digits in fours from the right to read hex directly: 1010 1111 = AF.
- Colour codes such as #FF8800 are three hex bytes (red, green, blue).
