Doubt Regarding Encoder

Check this thread...and more to read port pins ....

http://forum.arduino.cc/index.php?topic=44771.0

https://www.avrfreaks.net/forum/port-vs-pin

You'll likely encounter pre-defined registers, with labels 'PINA', 'PINB', 'PINC' etc.