okay, put it this way, if you look at the subnet mask, 255.255.255.0
in binary thats
1111 1111.1111 1111.1111 1111. 0000 0000
1111 1111=255 or FF in hex. As far as subnet Masking is concerned, you have your assigned network number which cannot be changed. That is 255.255 or first two octet portion of the subnet mask. So we can discard that and only deal with what we are allowed to change, the last two octets.
So if you have
1111 1111.0000 0000, we know anything that is 1's is for networks (subnets), and anything 0's is for hosts. IP addresses cannot end in 0 or 255 so that means there are 256 possible subnets and 254 possible hosts. In order to alter what you have, all you do is take bits away from one side and give to the other, then convert the bits to the base of your choice. We know we have too many hosts currently, so we will take 1 bit away from hosts.
Now we have 1111 1111 .1000 0000, 1111 1111 1=512, and the 000 0000 leaves room for 126 hosts. Do you see the pattern? The reason why its 126 for this instance is because in binary 1111111= 127, Since your network number is extending into the last octet, you don't worry the IP address being zero in the last portion, so 127 becomes 126 only because you can't have a 255. If you move the bits over again, you end up with 1111 1111 11 = 1024 subnets and 00 0000 = 62 hosts. 11 1111 = 63. This becomes 62 for the same reason the last example became 126.
As far as giving routers IP addresses, a router must have some IP address that belongs to the subnet its interface is on; however, this will effect the routing tables.
The first step would really be to assign network numbers to subnets. Then assign routers a fairly consistent IP address on each one.
Here is a example of a pretty wierd network I had to design in school once
Heres static routes that go along with that network.
R1 Routing Table
IP route 150.10.24.0/21 150.10.16.2
IP route 150.10.32.0/21 150.10.16.2
IP route 150.10.40.0/21 150.10.16.2
IP route 150.10.48.0/21 150.10.16.2
IP route 150.10.56.0/21 150.10.16.2
IP route 150.10.64.0/21 150.10.16.2
IP route 150.10.72.0/21 150.10.16.2
IP route 150.10.80.0/21 150.10.16.2
IP route 150.10.88.0/21 150.10.16.2
IP route 150.10.96.0/21 150.10.16.2
IP route 150.10.104.0/21 150.10.16.2
IP route 150.10.112.0/21 150.10.16.2
IP route 150.10.120.0/21 150.10.16.2
R2 Routing Table
IP route 150.10.8.0/21 150.10.32.1
IP route 150.10.32.0/21 150.10.24.2
IP route 150.10.40.0/21 150.10.24.2
IP route 150.10.48.0/21 150.10.24.2
IP route 150.10.56.0/21 150.10.24.2
IP route 150.10.64.0/21 150.10.24.2
IP route 150.10.72.0/21 150.10.24.2
IP route 150.10.80.0/21 150.10.24.2
IP route 150.10.88.0/21 150.10.24.2
IP route 150.10.96.0/21 150.10.24.2
IP route 150.10.104.0/21 150.10.24.2
IP route 150.10.128.0/21 150.10.32.1
IP route 150.10.136.0/21 150.10.32.1
R3 Routing Table
IP route 150.10.8.0/21 150.10.24.1
IP route 150.10.16.0/21 150.10.24.1
IP route 150.10.40.0/21 150.10.40.1
IP route 150.10.48.0/21 150.10.40.1
IP route 150.10.56.0/21 150.10.40.1
IP route 150.10.64.0/21 150.10.40.1
IP route 150.10.72.0/21 150.10.40.1
IP route 150.10.80.0/21 150.10.40.1
IP route 150.10.88.0/21 150.10.40.1
IP route 150.10.112.0/21 150.10.24.1
IP route 150.10.120.0/21 150.10.24.1
IP route 150.10.128.0/21 150.10.24.1
IP route 150.10.136.0/21 150.10.24.1
R4 Routing Table
IP route 150.10.8.0/21 150.10.24.1
IP route 150.10.16.0/21 150.10.24.1
IP route 150.10.24.0/21 150.10.24.1
IP route 150.10.48.0/21 150.10.80.2
IP route 150.10.56.0/21 150.10.80.2
IP route 150.10.64.0/21 150.10.80.2
IP route 150.10.72.0/21 150.10.80.2
IP route 150.10.96.0/21 150.10.32.1
IP route 150.10.104.0/21 150.10.32.1
IP route 150.10.112.0/21 150.10.32.1
IP route 150.10.120.0/21 150.10.32.1
IP route 150.10.128.0/21 150.10.32.1
IP route 150.10.136.0/21 150.10.32.1
R5 Routing Table
IP route 150.10.8.0/21 150.10.64.1
IP route 150.10.16.0/21 150.10.64.1
IP route 150.10.24.0/21 150.10.64.1
IP route 150.10.32.0/21 150.10.64.1
IP route 150.10.40.0/21 150.10.64.1
IP route 150.10.72.0/21 150.10.64.1
IP route 150.10.80.0/21 150.10.64.1
IP route 150.10.88.0/21 150.10.64.1
IP route 150.10.96.0/21 150.10.64.1
IP route 150.10.104.0/21 150.10.64.1
IP route 150.10.112.0/21 150.10.64.1
IP route 150.10.120.0/21 150.10.64.1
IP route 150.10.128.0/21 150.10.64.1
IP route 150.10.136.0/21 150.10.64.1
R6 Routing Table
IP route 150.10.8.0/21 150.10.80.1
IP route 150.10.16.0/21 150.10.80.1
IP route 150.10.24.0/21 150.10.80.1
IP route 150.10.32.0/21 150.10.80.1
IP route 150.10.40.0/21 150.10.80.1
IP route 150.10.48.0/21 150.10.64.2
IP route 150.10.56.0/21 150.10.64.2
IP route 150.10.88.0/21 150.10.80.1
IP route 150.10.96.0/21 150.10.80.1
IP route 150.10.104.0/21 150.10.80.1
IP route 150.10.112.0/21 150.10.80.1
IP route 150.10.120.0/21 150.10.80.1
IP route 150.10.128.0/21 150.10.80.1
IP route 150.10.136.0/21 150.10.80.1