As far as I can tell, class restriction values are stored as a bitfield, where each bit represents a class.
For example, 1023 in binary is 1111111111, meaning all 10 classes are able to equip the item. 1022 would be 1111111110, which means the class represented by the right-most position is unable to equip the item.
Keeping in mind that these positions start from the rightmost side of the number (as with decimal), the positions go in order of class release, so (using KR names for parity with the game files):
position 0: Lethita
position 1: Fiona
position 2: Evy
position 3: Kalok
position 4: Kay
position 5: Vella
position 6: Hurk
position 7: Lynn
position 8: Arisha
position 9: Hagie
If we had Delia, she would occupy the 10th position.
So an "all-females" bitfield would be positions 1, 2, 5, 7, and 8, or 0110100110, which in decimal would be 422. All-males would be 1001011001, or 601. Kalok + Hurk would be 0001001000, or 72.
Hopefully that helps.