Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static System.Boolean[] ByteToBits(System.Byte InByte)
- {
- System.Boolean[] xReturn = new System.Boolean[8];
- for (System.Int32 i = 0; i < 8; i++)
- {
- xReturn[i] = (InByte & (128 >> i)) != 0;
- }
- return xReturn;
- }
- public static System.Boolean GetBit(System.Byte InByte, System.Int32 BitIndex)
- {
- return (InByte & (128 >> BitIndex)) != 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement