3

I've got a 64 bit number in VBScript (WScript) that I want to divide into 32 bit high part and low part. The number is represented as a string (in base 10). The largest supported primitive is a 53 bit double, so I can't do a usual modulus op to get the bits and I can't bit shift in VBScript. Also, all numbers are signed, so you can only operate 2^31 with primitives.

Curious if anyone could point to an algorithm to handle bitwise operations entirely in strings with VBScript? Or more simply... be able to convert a FILETIME number string to it's respective 32 bit high part and 32 bit low part.

Thanks, Chenz

Lizz
  • 1,442
  • 5
  • 25
  • 51
Crazy Chenz
  • 12,650
  • 12
  • 50
  • 62
  • What you are trying to accomplish in the first place? Your question looks like an [XY problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) to me. – Helen Nov 15 '11 at 08:23
  • Problem originated from wanted to convert between a SYSTEMTIME structure and FILETIME structure with a native windows script. – Crazy Chenz Nov 16 '11 at 04:08
  • 3
    It might help if you included a sample initial string that needs to be converted to a 64bit value. – AnthonyWJones Nov 16 '11 at 13:28

1 Answers1

0

There is a library called Megamath for doing similar kind of operations.. check out this link

http://sourceforge.net/projects/megamath/files/

Buddha
  • 4,339
  • 2
  • 27
  • 51