What is the proper way to load a 32-bit integer with 23 bit values from a database? For instance, I have a database record with 23 fields that are a bit datatype. I want to load those 23 fields' values into a 32-bit integer value and return it as one value to be parsed in a different function. Is this the idea?:
intValue = first_bit_field_value;
intValue = intValue + (second_bit_field_value * 2);
intValue = "" + (third_ "" * 4);
"" "" * 8);
"" "" 16
"" "" 32
"" "" 64
"" "" 128
"" "" 256
"" "" 512
etc...
Any help would be appreciated.
intValue = first_bit_field_value;
intValue = intValue + (second_bit_field_value * 2);
intValue = "" + (third_ "" * 4);
"" "" * 8);
"" "" 16
"" "" 32
"" "" 64
"" "" 128
"" "" 256
"" "" 512
etc...
Any help would be appreciated.