Max byte
- Input
- 11111111₂
- Expected output
- 255₁₀
The whole byte turned on adds 128+64+32+16+8+4+2+1, every power of 2 from 2⁰ to 2⁷ at once.
binary to decimal
Each binary digit carries an increasing power of 2 from right to left: the rightmost bit is worth 2⁰, the next 2¹, and so on up to the most significant bit, which alone accounts for the largest share of the final value. The tool adds up these weights in BigInt, accepting up to 256 digits in the source base and an optional minus sign, without the 32- or 64-bit ceiling that trips up ordinary calculators.
The whole byte turned on adds 128+64+32+16+8+4+2+1, every power of 2 from 2⁰ to 2⁷ at once.
The two highest bits, 128 and 64, already add up to 192 alone: it is the first octet in addresses like 192.168.x.x.
A ninth bit to the left no longer fits in a single byte: 256 is the first decimal value that 8 bits alone cannot represent, since the largest is 255.
Converting a number between bases means representing the same value using a different set of digits. A decimal (base 10) number can be expressed exactly in binary (base 2), hexadecimal (base 16), or any other base.
Yes: just prefix the binary value with a minus sign, like -1010₂, which the tool converts to -10₁₀. That differs from the two's complement processors use internally, where the highest bit marks the sign without a separate character.
Because it alone accounts for nearly half of the total value: in an 8-bit byte, the MSB is worth 128, more than the sum of the other seven bits combined (127). Getting that one bit wrong changes the result more than getting any combination of the rest wrong.
Up to 256 digits in the source base, computed entirely in BigInt: no floating-point rounding enters the calculation, unlike what would happen if it used JavaScript's Number type past 53 bits.
All data stays in your browser. No numbers are sent to any server.