I have a string which I'm converting to BigInteger by parsing then shifting it by 3 bits to the left and convert to a string again. The problem is that it always output extra bits before the actual value. For example:
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Dim positiveString As String = "C0020ACB1086886D8C2E4D2DEDC726A6"
Dim posBigInt As BigInteger = 0
posBigInt = BigInteger.Parse(positiveString, System.Globalization.NumberStyles.AllowHexSpecifier)
posBigInt = posBigInt << Hex(3)
RichTextBox1.Text = posBigInt.ToString("X")
End Sub
- Gives me: E001056588434436C6172696F6E393530 - Which is incorrect
- First 4 bytes Should be: 00105658 (I can't check the whole array because i don't know another way to do it other then BigInteger, checked with UInt64)
The "E" before the value is what I can't explain. I tried different hex strings but it always produces those extra bits. What am I doing wrong?