Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
language:expressions [2024/07/19 14:26] – [Bit-width rules] rajitlanguage:expressions [2025/03/06 22:27] (current) – [Bit-width rules] rajit
Line 78: Line 78:
   * For concatenation, the bit-width is the sum of all the components.    * For concatenation, the bit-width is the sum of all the components. 
   * For bitfield extraction, the bitwidth is determined by the number of bits extracted.   * For bitfield extraction, the bitwidth is determined by the number of bits extracted.
 +
 +==== Idiosyncrasies ====
  
 While these bit-width rules are nice because you never lose bits, they can have some unexpected consequences. One of the not-so-nice effects of these rules is that, technically, addition is no longer associative in general! For example, consider the following two different assignment statements: While these bit-width rules are nice because you never lose bits, they can have some unexpected consequences. One of the not-so-nice effects of these rules is that, technically, addition is no longer associative in general! For example, consider the following two different assignment statements: