Use Bit Patterns for Powers, Divisibility, and Subsets
A binary pattern can be more than a numeral. It can expose a factor, record a take-or-leave choice, or index one subset without listing every case.
Read a bit pattern as an instruction
In this lesson, the same 0–1 language does three jobs:
Three reusable translations
The empty mask 000…0 is one subset. Excluding it leaves 2^n-1 nonempty subsets.
Turn 2ⁿ − 1 into a ribbon of 1-bits
Need a hint?
Subtracting 1 from a power of two fills all lower places with 1s.
Group eighteen 1-bits to prove divisibility by 7
Need a hint?
One block 111₂ is worth 7; count the three-bit blocks.
Use equal blocks to prove repunit divisibility
Need a hint?
Divide the ribbon length by the block length.
Use paired bits to prove divisibility by 3
Optional remainder notation: “a ≡ b (mod 3)” means a and b leave the same remainder when divided by 3. Since 2 is one less than 3, multiplying two such factors leaves remainder 1. The paired-bit proof below does not require this notation.
Binary-block proof
Twenty-two 1-bits make eleven copies of 11₂. Each block has decimal value 3.
Remainder-cycle check
This is an added second language for the same result. The worked example chapter’s binary pattern remains the main route.
Need a hint?
Pair the 22 one-bits into blocks of 11₂.
Pair an alternating power sum to expose factors of 5
Reduced binary pattern
101010101010101₂ uses the even powers from 214 down to 20.
Exact values
Need a hint?
Pair neighboring terms twice to expose a factor of 5.
Use five bits to choose sugar bags
Need a hint?
Include the all-zero mask only when counting all subsets.
Separate number of subsets from number of distinct totals
Treat every listed item as separately selectable, even when two weights are equal. Each item can be taken at most once; item order in the list fixes mask positions from left to right. Totals include the empty choice, 0. A collision example: with boxes 1, 2, and 3, taking the 3-box and taking the 1- and 2-boxes are different subsets with the same total. There are eight masks, but only seven different totals: 0 through 6.
Total-frequency bars
Mask ledger
Need a hint?
Different subsets can have the same total; list totals from zero upward.
Use a binary mask to index powers-of-three subset sums
Need a hint?
Write the rank in binary and match its bits to the displayed powers of three.
Bit-pattern workshop
Correct all eight answers to complete the workshop. Write counts and totals in decimal; only Question 7 asks for a bit mask.
Need a hint?
Answers: 10; 3; 15; 11; 21,845; 31; 10011; 256. Each mask bit makes one take/leave choice. For 19, take 16+2+1. For rank 39, mask 100111 selects 243+9+3+1.
Exit ticket and certificate
Need a hint?
Answers: 111111111₂; 1057; 4369; 63; 30. Three five-bit blocks give quotient 1+2⁵+2¹⁰=1057. Six bags give 64 masks, of which 63 are nonempty. Rank 10 has mask 001010, selecting 27+3=30.