Format a word as a hex string.
String toHex16(int value) => (value & 0xFFFF).toRadixString(16).padLeft(4, '0');