Integer to array of bits and back


I have six booleans (checkbox) and I need to save those values to database (and get also).
Problem is I only have one integer field for that.
I thougt I can save six bits as integer so 63 is &b111111 (all true).
Do I just use bin(63) and split that string to array or is there more efficient methods for that?



dim v as integer = valueFromDb
for i as integer = 0 to 5
  dim mask as integer = 2^i
  cb( i ).Value = _
    ( v and mask ) <> 0


Note: That code will test the bits from right to left. To reverse it, use 2^( 5 - i ) for the mask or cb( 5 - i ).Value = ... to set the Checkbox value.