i is the bit index. PORTB.0[i] = 0 is PORTB.BIT[i] = 0. i increments from 0 to 7, so it clears
PORTB.0 to PORTB.7.