Binary to HEX
Express one binary integer with fewer digits in hexadecimal while keeping its exact value.
Express one binary integer with fewer digits in hexadecimal while keeping its exact value.
How to use
- Paste the sample as a single integer. Leave the optional 0b prefix in place if it is already present.
- Run the conversion to base sixteen.
- To check the result, group the input from the right in blocks of four bits.
Worked example
Input
100000000000000000000000000000000000000000000000000001Expected result
20000000000001Check the result
The sample starts with a 2 and ends with a 1 in hexadecimal.