一个数的高四位为整数部分,第四位为小数部分,求这个数
float date= 0; char highsAddress,lowsAddress; highsAddress = (ba[0] & 0xf0) >> 4; //其中ba【0】表示十六进制数 lowsAddress = ba[0] & 0x0f; date= highsAddress + lowsAddress*0.0001;
float date= 0; char highsAddress,lowsAddress; highsAddress = (ba[0] & 0xf0) >> 4; //其中ba【0】表示十六进制数 lowsAddress = ba[0] & 0x0f; date= highsAddress + lowsAddress*0.0001;