24 lines
534 B
C#
24 lines
534 B
C#
namespace CommonConsole
|
|
{
|
|
using Common.Hardware.Ports;
|
|
using Common.Hardware.WaterMeter.eRegister.Features;
|
|
|
|
using System;
|
|
using System.Reflection;
|
|
|
|
public class Program
|
|
{
|
|
public static void Main()
|
|
{
|
|
byte val = 31;
|
|
// 1 1 1 1 1 0 0 0
|
|
var y = val.GetBitsLE().GetByteLE(0, 3);
|
|
var x = 0;
|
|
x ^= (byte)(val >> 0);
|
|
x ^= (byte)(val >> 1);
|
|
x ^= (byte)(val >> 2);
|
|
|
|
Console.WriteLine(y);
|
|
}
|
|
}
|
|
} |