How to change the internal logic of an IR sensor module?

Also please go back and edit your code to place it in code tags after removing the unnecessary blank lines.

As stated, sensor states are arbitrary. "0=off 1=on" is only a convention. So you can also:

#define IR_ON 0
#define IR_OFF 1

void setup() {
pinMode(8, INPUT);
Serial.begin(9600);
}
void loop() {
int ir_reading = digitalRead(8);
if ( ir_reading == IR_ON ) {
  Serial.println(1);
else {
  Serial.println(0);
}
delay(1000);
}