The problem I was having is that bitset would not take the 33rd bits onward when the value is assigned from an ULL. The 33rd bit onwards were being all set to zero. Also, the to_ullong() is not recognized. I could assign a value to a bitset (longer than 32 bits) from a string but could not convert it to ULL.
But interestingly enough, I tried it in MS Visual C++ and it works. I think the bitset in Borland C++ Builder has some limitation when it comes to assigning from and converting to ULL. I would probably need another bitset library.
I guess, my next question is "How do I make it work with Borland C++ Builder?"