@fengjingchao @yifan-gu BTW, ballot.go has a lot of unreasonable stuffs.
I do not think you should use uint64 everywhere. In most cases, int is OK. 
I would prefer to have a more clear ballot structure including all the fields as uint32. And add a toUint64 function to assemble all the fields into a uint64. 
So you do not need so much bit operations, which is error-prone and ugly.