This is NOT a question about Discord, but about how a feature on Discord was implemented.
Discord has a system in place where a set of numbers added together can represent a set of selected permissions. I spent some time looking around the internet and playing with Discord's link generator to form an understanding of what is happening but I haven't been successful.
In the following image, it can be seen that I have selected a set of permissions for a small bot and in the generated URL a number is provided under the permissions parameter:

What I don't understand is, how are the numbers (for each permission) assigned such that when any combination of numbers is added together there are no conflicting/ambiguous results?
Also, once a number is generated, how are the numbers interpreted and converted back to their original meanings?