You add all the entries and truncate to 7 bits - no need to do any tests or % operators, just sum then
sum & 0x7F will return the low 7 bits of the sum.
You add all the entries and truncate to 7 bits - no need to do any tests or % operators, just sum then
sum & 0x7F will return the low 7 bits of the sum.