Oct 27 2017

To map each bit in a single byte to individual bools do this (using c#)

Implemented as two extension methods in this example. Using an enum to get the bit your looking for.

public enum Weekday
{
    Sunday=7,
    Monday=6,
    Tuesday=5,
    Wednesday=4,
    Thursday=3,
    Friday=2,
    Saturday=1
}

public static bool GetBitwiseBool(this byte bits, Weekday weekday)
{
	return (bits & (1 << (int)weekday - 1)) != 0; 
} 

public static bool GetBitwiseBool(this string bits, Weekday weekday) 
{ 
    if (!bits.All(c=>"01".Contains(c)))
	{
		bits = "11111111";
	}
	
	//8 character or less
	if (bits.Length>8)
	{
		bits = bits.PadLeft(8,'0');
	}

	var myByte = Convert.ToByte(bits, 2);
	return myByte.GetBitwiseBool(weekday);
}