Comparing two output

Let's go back to basics

Which Arduino board are you using and what is connected to pin 2 to cause the interrupts ?