ビット単位の演算子(、など)を使用して、&
サイズ|
の異なる2つのビットフィールドを比較するとどうなりますか?
たとえば、:と比較0 1 1 0
し0 0 1 0 0 0 0 1
ます。
0 1 1 0 0 0 0 0 The smaller one is extended with zeros and pushed to the
0 0 1 0 0 0 0 1 most-significant side.
または...
0 0 0 0 0 1 1 0 The smaller one is extended with zeros and pushed to the
0 0 1 0 0 0 0 1 least-significant side.
または...
0 1 1 0 The longer one is truncated from its least-significant side,
0 0 1 0 keeping its most significant side.
または...
0 1 1 0 The longer one is truncated from its most-significant side,
0 0 0 1 keeping its least-significant side.