不应该是0x00000100 = 4.
我理解0x00000001 = 1,因为2 ^ 0和0x00000010 = 2,因为2 ^ 1.我的想法有什么问题?@H_403_3@
initVariable(&variable1,"variable1","1,2,3",0x00000100);
assertIntegerEquals(variable1.address,4); // 0x00000100 = 4?
我的断言失败了,因为它说256!= 4@H_403_3@
以0x开头的数字在C中被解释为十六进制(16位)
所以0x10 == 16,0×100 == 256,0×10000 == 65536等@H_403_3@
两个的权力是:@H_403_3@
> 20 = 0x1> 21 = 0x2> 22 = 0x4> 23 = 0x8> 24 = 0x10> 25 = 0x20> 26 = 0x40> 27 = 0x80@H_403_3@