BCD码转换成十进制
摘要:private static int IntToBCD(int i) //十进制转BCD { return (((i / 10) << 4) + ((i % 10) & 0x0f)); } private static int BCDToInt(byte bcd) //BCD转十进制 { return (0xff & (bcd >> 4)) * 10 + (0xf & bcd); }
阅读全文
posted @
2011-07-21 10:35
noble_herb
阅读(2204)
推荐(0)