program of remote control

void setup()
{
  pinMode(15,INPUT);
  Serial.begin(9600);
}

void loop()
{
  int v=0;

  int a=pulseIn(15,LOW);
  if(a>2000)
  {
    for(int i=0;i<12;i++)  
    {
      if(pulseIn(15,LOW)>1000)//doubt is here
      {
        v=v+(1<<i);

        
      }
    }
    Serial.println(v);
    delay(500);
  }
}

This is code for receiving remote signal and converting it to decimal.my protocol is of about 13 bit information. see that (pulseIn(15,LOW)>1000 line.here it receiving 12 bit of data by skipping first start bit.why it is so.

    for(int i=0;i<12;i++)

0 to 11 is 12 iterations, not 13.

yes,what i mean is ,does it take from msb or lsb.if it was from lsb it include star bit but leave one bit of adrress value.help me

I don't see that it matters (nor is it possible to tell without seeing the original device's spec), as long as you preserve the order when you pass the code on.

okay thanks