Don't use pins 0 or 1. They are reserved for uploading sketches. Since you don't know port manipulation, you should use a library or code that doesn't require you to do so. Here is such a library:
The rotary encoder example code even has 3 encoders. Just read THROUGH the library and documentation BEFORE you ask any questions.