Bitwise operator problems Numbers
BackSelect your options below
About this worksheet
Suits Year 9 and upThe logic gates of every processor, on paper: line up two binary numbers and combine them column by column with AND (1 only when both are 1), OR (1 when either is), or XOR (1 when they differ).
No carrying, no borrowing, each column decides alone, which makes bitwise work oddly restful once the three little truth rules are known.
How to make your worksheet
- Choose the types of problems.
- Press Generate for a fresh page.
- Print it. Answers included.
Every press of Generate lays out a fresh sheet, ready to print on A4.
Common questions
The three rules, in one breath each?
AND is strict: both or nothing. OR is generous: anyone will do. XOR is contrary: yes only when the two disagree. Three temperaments, one column at a time.
Why would a student ever need XOR?
It is the workhorse of computing tricks: XOR a value twice and it returns unchanged, which powers simple encryption and error-checking. Any student headed toward programming will shake hands with it soon enough.