You can convert int to its binary representation in two ways:

  • normal method

    int value = 14;
    List<bool> binaryValue = new List<bool>();
    do
    {
    	binaryValue.Add((value % 2 == 1) ? true : false);
    	value /= 2;
    } while (value != 0);
    binaryValue.Reverse();
    binaryValue = {true, true, true, false};
  • Convert.ToString(byte value, int toBase) method

    int value = 14;
    string binaryString = Convert.ToString(value, 2);
    bool[] binaryValue = binaryString.Select(c => c == '1').ToArray();
    binaryString = "1110"
    binaryValue = {true, true, true, false};