There are several ways to go about this, based on the limitations of the database you are using.
If you are able to store byte arrays within the database, you can use the BitArray class. You can pass the constructor a byte array, use it to easily check and set each bit by index, and then use it's built in CopyTo method to copy it back out into a byte array.
Example:
byte[] statusBytes = yourDatabase.Get("passed_failed_bits");
BitArray statusBits = new BitArray(statusBytes);
...
statusBits[65] = false;
statusBits[66] = true;
...
statusBits.CopyTo(statusBytes, 0);
yourDatabase.Set("passed_failed_bits", statusBytes);
If the database is unable to deal with raw byte arrays, you can always encode the byte array as a hex string:
string hex = BitConverter.ToString(statusBytes);
hex.Replace("-","");
and then get it back into a byte array again:
int numberChars = hex.Length;
byte[] statusBytes= new byte[numberChars / 2];
for (int i = 0; i < numberChars; i += 2) {
statusBytes[i / 2] = Convert.ToByte(hex.Substring(i, 2), 16);
}
And if you can't even store strings, there are more creative ways to turn the byte array into multiple longs or doubles.
Also, if space efficiency is an issue, there are other, more efficient (but more complicated) ways to encode bytes as ascii text by using more of the character range without using control characters. You may also want to look into Run Length Encoding the byte array, if you're finding the data remains the same value for long stretches.
Hope this helps!