title: Case statement in verilog
body: <p>I came across priority encoder design and found out a new way to do it using a case statement.
  The only thing that is confusing is, does a case statement give priority to cases?
  Example:   </p>
  
  <pre><code>case(1'b1)                                
    A[3]: Y&lt;=4'b1000;             
    A[2]: Y&lt;=4'b0100;  
    A[1]: Y&lt;=4'b0010;  
    A[0]: Y&lt;=4'b0001;  
    default:Y&lt;=4'b0000;
  endcase
  </code></pre>
  
  <hr>
  
  <p>Here if I give <code>A</code> as <code>1111</code> <code>Y</code> gets <code>1000</code> i.e it gives priority to the first case statement.
  Why is this so?</p>