Ideally the math should be done once only. Because, 500 users concurrently on your forum might just make the pow function the straw the broke your poor server. So, it should be done once and then stored somewhere for future use. If you wish store it in the database, or store it along with the XML file.
I have no idea about the rebuild bit fields myself, I'm not a plugin author for vB. But should I stumble across the answer, I'll be sure to post it back here. Until then, I'll leave you in the capable hands of the community.
Well the usergroups can only be edited by the admins so I was more meaning to rebuild the bitfields at the time of editing the categories/groups. i.e. if someone wants to add a new grouping. So it would need to recalculate it just once but whenever the groupings are saved.
Like I said though for my current version I'm just expanding it to 5 groupings (titles can be altered through phrases) and I was just trying to see how much trouble it would be to make it database driven. And it seems it would be quite hard lol.