![](/static/66c60d9/assets/icons/icon-96x96.png)
![](https://programming.dev/pictrs/image/8140dda6-9512-4297-ac17-d303638c90a6.png)
Ahh, that makes sense. Powers of two are real convenient. Your math is a little wrong though: X != (X & 0xFF) + (X >> 8), but X = (X & 0xFF) + (X >> 8) << 8
The right half can be removed entirely if you’re doing modulo 16, since the first 4 bits will always be 0. So it simply becomes X & 15
! Much cleaner for sure.
But there’s no “biological” reason for that. In the same way, skirts/dresses being for women and suits/ties being for men, leg hair, haircuts, voice, mannerisms, emotional availability, all get tied one gender or another.
We, in our society, have associated some properties to one of two genders. Some of these properties tend to be associated to one sex (sex being a more “biological” thing (but still not binary or unchangeable!)), but many of them are just expectations we put upon people. This is what “gender is a social construct” means; that the general understanding and intuition about gender is constructed by the society in which we live. Different societies may have more than 2 genders or completely different sets of associations.
Unfortunately these categorizations are bad for a significant portion of the population, including trans people, gender non-confirming people, but even cishet people; how many times have you heard of some act making you “not a real man” (eg crying for a movie)?