Binary & Hex Converter
Convert binary, decimal, and hexadecimal while reading IoT bytes and registers
Binary & Hex Converter
Turn one IoT value into decimal, hexadecimal, and binary. Then inspect each bit so raw sensor bytes, GPIO registers, and protocol headers become readable instead of mysterious.
Number Conversion Animation
The same value is shown in three number systems. Step through the process to see why hex is a compact way to write binary bytes.
Bit Visualizer
Bit 0 is the least significant bit on the right. Click any bit to inspect its place value.
Sensor Byte
0x7F is 127 unsigned. As an 8-bit signed value, it is still +127.
GPIO Register
0xA5 is 1010 0101, so pins 0, 2, 5, and 7 are HIGH.
MQTT Header
0x10 is the MQTT CONNECT fixed header byte: type 1 with flags 0.
Learning Support
Beginner Model
Binary uses base 2, decimal uses base 10, and hexadecimal uses base 16. They can all describe the same stored value.
Hex Shortcut
One hex digit equals one nibble, which is four bits. Two hex digits make one byte, so 0xA5 becomes 1010 0101.
Common Mistakes
- Reading bit 0 from the left instead of the right.
- Mixing signed and unsigned interpretations.
- Forgetting that a fixed width controls overflow.
Quick Reference
| Decimal | Hex | Binary | Typical IoT Meaning |
|---|---|---|---|
| 0 | 0x00 | 0000 0000 | all flags off, null byte |
| 16 | 0x10 | 0001 0000 | MQTT CONNECT fixed header byte |
| 127 | 0x7F | 0111 1111 | maximum signed 8-bit positive value |
| 128 | 0x80 | 1000 0000 | minimum signed 8-bit negative value |
| 165 | 0xA5 | 1010 0101 | alternating GPIO flags |
| 255 | 0xFF | 1111 1111 | all 8-bit flags on, unsigned byte maximum |
| 1023 | 0x03FF | 0000 0011 1111 1111 | 10-bit ADC maximum count |
| 4095 | 0x0FFF | 0000 1111 1111 1111 | 12-bit ADC maximum count |