skeeter84 ![](fl/ua)
Posted on: Sun Jun 10, 2018 4:01 pm
Posts: 136 Joined: Tue Apr 24, 2012 7:47 pm
|
![Post Post](./styles/etech/imageset/icon_topic_latest.gif) Bitwise AND combination tables - now with zeroes!
Good afternoon to everybody here on calcudoku.org. A user named marblevolcano recently submitted an interesting twin puzzle using both the bitwise OR and bitwise AND operators. Unfortunately, many people had difficulty solving it due to there being no tables of combos. Today, I'm acting as a Calcudoku genie - I'm granting your wish for bitwise AND tables!
First, 3 important caveats:
A) Unlike clm, I did NOT distinguish between L-shaped and straight-line cages for my 3-cell bitwise AND table. B) I only compiled tables for cages with 2 or 3 cells. C) My tables do not include the numbers 9 or above.
A list of the numbers 1-15 represented in binary can be found in the post "Full tables: MOD and bitwise OR" by clm under the "Solving strategies and tips" section of the forum. You'll need to scroll down for a bit to see it, and I strongly recommend keeping a copy of that list close at hand when working with bitwise AND/OR operators.
Without further ado, here are my bitwise AND tables.
2 cells
0& 01 02 03 04 05 06 07 08 12 14 16 18 24 25 28 34 38 48 58 68 78 1& 13 15 17 35 2& 23 26 27 36 3& 37 4& 45 46 47 56 5& 57 6& 67
3 cells
0& 001 002 003 004 005 006 007 008 011 012 013 014 015 016 017 018 022 023 024 025 026 027 028 033 034 035 036 037 038 044 045 046 047 048 055 056 057 058 066 067 068 077 078 088 112 114 116 118 122 123 124 125 126 127 128 134 136 138 144 145 146 147 148 156 158 166 167 168 178 188 224 225 228 234 235 238 244 245 246 247 248 255 256 257 258 268 278 288 334 338 344 345 346 347 348 356 358 368 378 388 448 458 468 478 488 558 568 578 588 668 678 688 778 788
1& 113 115 117 133 135 137 155 157 177 335 355 357 2& 223 226 227 233 236 237 266 267 277 336 366 367 3& 337 377 4& 445 446 447 455 456 457 466 467 477 556 566 567 5& 557 577 6& 667 677
Suppose, for example, that someone were to submit a 6x6 twin puzzle using the bitwise AND operator. Imagine that we've got a 2-cell cage that needs 12x on one side and 0& on the other. In a 6x6 calcudoku, there are only 2 ways to achieve a product of 12 - either 2x6 or 3x4. The question is, which of those combos gives the required 0&? To find out, the 2x6 and 3x4 combos will be combined with bitwise AND.
First, though, let's see what 2, 3, 4, and 6 look like in binary code.
2………0010 3………0011 4………0100 6………0110
2………0010 6………0110
adding up each column, we get 0010
this result corresponds to 2 instead of the required result of 0
3………0011 4………0100
adding up each column, we get 0000
this result corresponds to 0 and is therefore the correct answer
A brief reminder as to how bitwise AND works:
0 and 0 make 0 0 and 1 make 0 1 and 1 make 1
It was my pleasure taking the time to compile these tables for you guys, and I hope this post helps you to solve bitwise AND puzzles.
|