cancel
Showing results for 
Search instead for 
Did you mean: 
Wayne_Humphrey
Level 6
Partner Accredited Certified

I always get asked how to convert a sighed integer to unsigned. Here is a little note on how to do stuff.


To find the FingerPrint DataBase record for a SIS Part file

Let’s look at this DVSSP

21A4146BF2584A70B34E4E025D4DACD3~FE~FEF41EE7~00~1.DVSSP


Look at the first 3 values between the '~' characters:

21A4146BF2584A70B34E4E025D4DACD3~FE~FEF41EE7~00~1.DVSSP


T
o find the Table in which this DVSSP belongs to you need to convert ~FE~ from HEX to Decimal: FE = 254


This is the table in which the Fingerprint record resides - table [dbo.MemberTable_254].

In table [dbo.MemberTable_235] look for a [ParentTransactionId] of 21A4146BF2584A70B34E4E025D4DACD3.

This will be the item in question or, if there are more than one item with the same [ParentTransactionId] you can look at FEF41EE7and convert it from HEX to Decimal (FEF41EE7= 1157914435) which is an unsigned integer

Now convert the unsigned integer to a signed integer = -16555737

And look for ??? in [FPHashPart1].

21A4146BF2584A70B34E4E025D4DACD3 – Transaction ID

~FE~ - MemberTable (HEX)

FEF41EE7– FB Hash part 1 (HEX unsigned integer)

~00~ - Uniquerfire

1 – Hash Version

.DVSSP – File Extension (Digital Vault Saveset SIS Part)


Convert unsigned to signed

FEF41EE7 = X = 4277411559          

if                             X <= 2^31 – 1 = X               

[ if                          X <= 2147483647, then X == the decimal value]

else if                   X > 2^31 – 1 = X – 2^32

[else if                  X > 2147483647, then X == (4277411559 - 4294967296) == -17555737]

Comments
Paul_Grimshaw
Level 6
Employee Accredited Certified
"I always get asked how to convert a sighed integer to unsigned"

Really do you?????? You should get out more dude :)
MarkBarefoot
Level 6
Employee
I think he's only allowed out on certain days - sad but true......still at least we all benefit :p
MichelZ
Level 6
Partner Accredited Certified
Yes, we keep him locked up now. It's for his own safety!
Version history
Last update:
‎04-07-2009 02:54 AM
Updated by: