using System; public class Test { public static void Main() { int n = 16; Console.Write("0x{0:x2} 0x{1:x2}", (n & 0xff00) >> 8, n & 0xff); byte lowByte = (byte)(n & 0xff); byte highByte = (byte)(n >> 8 & 0xff); Console.Write(lowByte); Console.Write(", "); Console.Write(highByte); } }