-1
I 3ビットマップアレイを有し、Iは、以下の条件に基づいてブール結果を計算する:この例では、BIT3とBIT2さでC、ビットマップ操作
Bit index -----------> 3 2 1 0
______________________________________________________________
1) Bitmap#1: 1 1 1 1 1 ? 1 1 (here, "?" could be 0 or 1)
2) Bitmap#2: 0 0 0 0 1 1 0 0
3) Bitmap#3: 0 0 0 0 1 0 0 0
:
例えば1) Neighboring even and odd index bits are a pair (the pair relationship will be provided by a bitmap). For example: pair0 = (bit1, bit0); pair1 = (bit3, bit2); etc.
2) For a given bit, if its pair has been already set to 0, then return false; else, return true.
ペア(ビットマップ#2を参照)。ビット3に1を指定してください(ビットマップ#3を参照)。
1) If bit #2 (the "?") in Bitmap#1 is 0, then return false;
2) If bit #2 (the "?") in Bitmap#1 is 1, then return true;
ビット演算を使用して結果を計算するにはどうすればよいですか?
ありがとうございました!
何を試しましたか?あなたの試みはどうやって動いたのですか? [良い質問をする方法を読む](http://stackoverflow.com/help/how-to-ask)、[最小限の、完全で検証可能な例](http: /stackoverflow.com/help/mcve)。 –