I am a Indian citizen holding a work residence permit from Norway for two years. I want to make some trips in the rest of the Schengen area. I am planning my first trip to Portugal on 22/08/18 till 26/08/18, a second trip to Italy from 22/11/18 to 27/11/18, and again to Portugal from 06/02/19 to 16/02/19. I will stay permanently inside Norway after each trip to other Schengen countries. How does the 90/180 rule work in this case? Am I allowed to make all those trips while holding my residence permit in Norway? Can you let me know if I'm exceeding the 90-day limit with these trips?
How does the 90/180 rule work in this case?
It works by not counting days that you spend in Norway while the permit is valid. The wording in the English version of the Schengen Borders Code is ambiguous, but this is the most restrictive interpretation. The actual text is in Article 6(2):
Periods of stay authorised under a residence permit or a long-stay visa shall not be taken into account in the calculation of the duration of stay on the territory of the Member States.
You also ask:
Am I allowed to make all those trips while holding my residence permit in Norway?
Yes. A Schengen residence permit or a they D visa (a "national" or "long-stay" visa) allows the bearer to spend up to ninety days of each 180-day period in the rest of of the Schengen area (apart from the country that issued the permit or visa).
Can you let me know if I'm exceeding the 90-day limit with these trips?
The way it works is that time spent in Norway during the validity of the permit doesn't count, so you're not even going to come close to running afoul of the rule.
For the sake of argument, though, we can count. Your first trip is five days long, the second is six days long, and the third is eleven days long, so that's a total of twenty-two days, which is of course far less than ninety.