flashman
← All guides

Binary, octal, decimal, and hex conversion

Convert between number bases for low-level debugging, flags, and hardware docs.

2026-06-08 · 5 min read

  • binary
  • hex

Firmware docs, permission bitmasks, and color channels often express values in hex or binary. Converting between bases by hand is error-prone—especially with leading zeros and two's complement.

Quick reference

Hex pairs map cleanly to bytes (FF = 255), which is why memory dumps use it.

  • Binary — bit flags (0b1010)
  • Octal — legacy Unix permissions
  • Decimal — everyday arithmetic
  • Hex — memory addresses, color channels

Debugging workflow

When a register dump shows 0xFF, convert to binary to see which feature flags are enabled. Cross-check with datasheet bit positions.

Try these tools