2011年7月21日
摘要: 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 阅读(2174) 评论(0) 推荐(0) 编辑