Binary - 32-bit hex conversion

Converting set of 32 bits into 32-bit hexadecimal number and vice versa.

My use case for this converter is editing dts files. While C/C++ allows to write numeric value in relatively clear way (bit sum with pre-defined values shifted to pre-defined positions) I don't think this is possible with dts and setting some value (especially multiple bits, spanning over two or more hex digits boundary) at e.g. bit offset 22 or checking if it is already set is error prone.

Binary:

Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Value
Bit # 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Value

Hex:


 "Cookie monsters": 4426846    Parse time: 0.001 s