weird behavior with or assignment

So forgive me if this is stupid, I am new to C/C++ and entirely self taught,so i wouldn’t be surprised if this is something really stupid on my part.

I am writing some code to read from 2 super nintendo controllers, I know, its probably been done, but I wanted to do it myself. Anyways, I am using the or assignment operator to or in bits of data into an array, however in the first loop through my for loop it seems to work, but subsequent loops I get alternating all 1s or 0s. I’m not really explaining this well, but see below my code and the output.

#define SNESClock 14       // SNES Clock Pin
#define SNESLatch 15       // SNES Latch Pin
#define SNESP1Pin 16       // SNES Player 1 data pin
#define SNESP2Pin 17       // SNES Player 2 data pin
#define SNES_Query() (PINC & 0x0C)

  void SNESPoll() {
  unsigned long RawBuffer;
  //latch high for 12us
  digitalWrite(SNESLatch, HIGH);
  delayMicroseconds(12);
  digitalWrite(SNESLatch, LOW);
  delayMicroseconds(6);   //wait 6us
  //zero out data buffer
  memset(SNESDat, 0, 2);
  //Start Clocking (12us pulses at 50% duty cycle) and Receiving
  for (byte i = 0; i < 16; i++) {
    Serial.print("Pass ");
    Serial.print(i);
    Serial.println(":");
    delayMicroseconds(3);
    //store data in raw buffer
    RawBuffer = SNES_Query();
    Serial.print("RawBuffer before shift =");
    Serial.println(RawBuffer, BIN);
    //shift raw buffer so the data we care about is the rightmost 2 bits
    RawBuffer >>= 2;
    Serial.print("RawBuffer after shift =");
    Serial.println(RawBuffer, BIN);
    //store raw buffer in data array
    for (byte j = 0; j < 2; j++) {
      SNESDat[j] <<= 1;
      RawBuffer >>= j;
      Serial.print("RawBuffer in loop rightshifted ");
      Serial.print(j);
      Serial.print("=");
      Serial.println(RawBuffer, BIN);
      Serial.print("Rawbuffer & 0x01 =");
      Serial.println((RawBuffer & 0x01), BIN);
      Serial.println(SNESDat[j] | (RawBuffer & 0x01), BIN);
      SNESDat[j] |= (RawBuffer & 0x01);
      Serial.print("SNESDat[");
      Serial.print(j);
      Serial.print("] =");
      Serial.println(SNESDat[j]);
    }
    digitalWrite(SNESClock, HIGH);  //clock back high
    SNESDat[0] = ~SNESDat[0];
    SNESDat[1] = ~SNESDat[1];
    delayMicroseconds(6);
  }
}

I’ve added a lot of serial.print()'s trying to debug this, but basically, it should read the data bit by bit, there should be 16 bits total, and each pass through the main loop it should or that data into my controller data array. When I run this my serial monitor output is:

Pass 0:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
0
SNESDat[0] =0
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
1
SNESDat[1] =1
Pass 1:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
11111111111111111111111111111110
SNESDat[0] =4294967294
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
11111111111111111111111111111101
SNESDat[1] =4294967293
Pass 2:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
10
SNESDat[0] =2
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
101
SNESDat[1] =5
Pass 3:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
11111111111111111111111111111010
SNESDat[0] =4294967290
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
11111111111111111111111111110101
SNESDat[1] =4294967285
Pass 4:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
1010
SNESDat[0] =10
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
10101
SNESDat[1] =21
Pass 5:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
11111111111111111111111111101010
SNESDat[0] =4294967274
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
11111111111111111111111111010101
SNESDat[1] =4294967253
Pass 6:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
101010
SNESDat[0] =42
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
1010101
SNESDat[1] =85
Pass 7:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
11111111111111111111111110101010
SNESDat[0] =4294967210
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
11111111111111111111111101010101
SNESDat[1] =4294967125
Pass 8:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
10101010
SNESDat[0] =170
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
101010101
SNESDat[1] =341
Pass 9:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
11111111111111111111111010101010
SNESDat[0] =4294966954
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
11111111111111111111110101010101
SNESDat[1] =4294966613
Pass 10:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
1010101010
SNESDat[0] =682
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
10101010101
SNESDat[1] =1365
Pass 11:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
11111111111111111111101010101010
SNESDat[0] =4294965930
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
11111111111111111111010101010101
SNESDat[1] =4294964565
Pass 12:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
101010101010
SNESDat[0] =2730
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
1010101010101
SNESDat[1] =5461
Pass 13:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
11111111111111111110101010101010
SNESDat[0] =4294961834
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
11111111111111111101010101010101
SNESDat[1] =4294956373
Pass 14:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
10101010101010
SNESDat[0] =10922
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
101010101010101
SNESDat[1] =21845
Pass 15:
RawBuffer before shift =1000
RawBuffer after shift =10
RawBuffer in loop rightshifted 0=10
Rawbuffer & 0x01 =0
11111111111111111010101010101010
SNESDat[0] =4294945450
RawBuffer in loop rightshifted 1=1
Rawbuffer & 0x01 =1
11111111111111110101010101010101
SNESDat[1] =4294923605

In my testing I am keeping pin 16 tied low and pin 17 is pulled high. So my final output should be SNESDat[0]=0000000000000000 and SNESDat[1]=1111111111111111 in binary. Where did I go wrong here? Any help would be appreciated, sorry if this is long/unclear.

Nevermind, I fixed it. I accidentally complemented my variables in the loop instead of after it. Stupid mistake.