title: How are the number of blocks for different classes in classful addressing determined in IPv4?
body: <p>The following are the initial bits (out of 32) for the different classes of addresses in IPv4:
  <a href="https://i.stack.imgur.com/0L6m0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0L6m0.jpg" alt="enter image description here"></a></p>
  
  <p>and the following are the number of blocks and block sizes respectively for each class:
  <a href="https://i.stack.imgur.com/FEOnx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FEOnx.jpg" alt="enter image description here"></a></p>
  
  <p>For class A, I can see that the number of blocks is <strong>2^7=128</strong>, and block size is <strong>2^24=16777216</strong>. But I am unable to understand the following:</p>
  
  <ul>
  <li><p>How the number of blocks in class B (16384), and in  class C (2097152) are calculated.</p></li>
  <li><p>How the size of blocks for classes D and E are calculated.</p></li>
  <li><p>How can class D and class E have the same number of blocks and block size even though their initial four bits are not the same?</p></li>
  </ul>
  
  <p>Please help me understand it as the calculation I used for class A is not working out for these. </p>