Azhaganandhan:
this is the code am using. am getting output as 3453 regularly please help me out in the code
It's likely better to read the port registers themselves .... like PINA, PINB, PINC, PIND etc.... or whichever ports you want to use. Once the registers are correctly set up, you could then pull out the bits of interest and then form your own 13 bit value from the relevant bits.