Help! Arduino `INPUT_PULLUP` not inverting
It isn't possible with the Atmega328P to switch how the IO pins translate a voltage to a binary value in a register. (And the internal pull-up has nothing to do with this)

Just check for the opposite condition in the code:

if(digitalRead(PIN5) == LOW) i += 4;
if(digitalRead(PIN6) == LOW) i += 8;