Convert short to bool[]

CSharp · Console

/Program.cs

using System;
using System.Linq;
using System.Collections;
					
public class Program
{
	public static void Main()
	{
		short input = 132;
		bool[] bits = new BitArray(new byte[] { (byte)input }).Cast<bool>().ToArray();
		foreach (var b in bits)
		{
			Console.WriteLine(b);
		}
	}
}
;