In the database, when the data entered, encountered a small problem. When you set the variable type to Bit, the data you write in is: "123",
A value like this is displayed: 3224115,
After several experiments, it was found that this was not an accidental value, and the result value of the following ' 0 ' was tried: 48, ' 1 ' result value: 49
Tried a bit ' 10 ' Result: 12592
Here is the analysis:
We know that for any number, the way the expression in the computer is binary, for convenience, we use Hex to store
By ' 0 ' and ' 1 ' know this is a asccii value of 48 49
However, for the value ' 10 ', the decimal value of ' 1 ' is 496 in value: 0x31 ' 0 ' has a decimal value of: 48, and the hexadecimal number is: 0x30
So the decimal number of ' 10 ' is: ox3031 conversion to binary is also possible. Of course the result is the same! 12592
So the value of "123" is first converted to ASSIICC value (49,50,51)--"switch to 16 binary: 0x313233 to binary or decimal
Number: 3224115
The little knowledge in the character (what is the decimal of "123")