255 into binary
- Value
- 255
- From base
- Decimal, base 10
- To base
- Binary, base 2
- Pad binary to this many bits
- 0
Converted value11111111
the largest value a single byte holds
Open this exampleWhole numbers converted between binary, octal, decimal, hexadecimal and base 36, with the bit width and an optional zero padding. Hexadecimal exists because one hex digit is exactly four bits, which is why memory addresses are written in it and not in decimal.
Also called: binary converter, hex to decimal converter.
255 in base 10 is 11111111 in base 2, which is 255 in decimal. The value needs 8 bits, so it fits in a single byte. In base 2 it takes 8 digits, against 3 in decimal. Bases that are powers of two convert to binary by regrouping digits. Decimal has no such relationship to the bits, which is why computing uses hex and octal instead.
| Base | Value | Digits |
|---|---|---|
| 2, binary | 11111111 | 8 |
| 8, octal | 377 | 3 |
| 10, decimal | 255 | 3 |
| 16, hex | FF | 2 |
| 36 | 73 | 2 |
A number in any base is the sum of its digits multiplied by powers of that base, so converting means evaluating that sum and then repeatedly dividing by the target base to read the new digits off the remainders. Bases that are powers of two convert to and from binary without arithmetic at all: one octal digit is three bits and one hexadecimal digit is four, so the conversion is regrouping rather than calculating. That property is the whole reason hexadecimal is used in computing, where decimal has no such relationship to the underlying bits.
each digit is worth its face value times the base raised to its position, which is the definition every base sharesEach of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.
Converted value11111111
the largest value a single byte holds
Open this exampleConverted value255
boundary: the round trip must return the same value
Open this exampleFormula version 1.0.0 · definition 1.0.0 · United States · Report a problem with this calculator