For example, for two
uint16 values, is it possible to concatenate them into one
uint32 value and also retrieve the original value later (bitwise operators)?
Please note that I do not mean addition by typecasting the 16 bit value to a 32 bit value and adding them together (
+). But packing two 16 bit values into a 32 bit value.
So that instead of this:
A B | | mapping (uint16 => mapping (uint16 => bool)) data;
I can do this:
(A << 16) | B | mapping (uint32 => bool) data;