public static byte Encode(byte value)
{
if (value > (byte)99)
throw new ArgumentOutOfRangeException(nameof(value), "A binary-coded decimal has a maximum value of 99 for a single byte");
byte high = (byte)((value / TenP1) & 0x0F);
byte low = (byte)((value % TenP1) & 0x0F);
return (byte)(low + (high << 4));
}