Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
language:expressions [2024/07/19 14:25] – [Bit-width rules] rajit | language:expressions [2025/03/06 22:27] (current) – [Bit-width rules] rajit | ||
---|---|---|---|
Line 76: | Line 76: | ||
- //left// + 2^//right// - 1 | - //left// + 2^//right// - 1 | ||
* left shift ''<<'' | * left shift ''<<'' | ||
- | * For concatenation, | + | * For concatenation, |
+ | * 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, | 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, |