Odd Parity Bit
Given an integer, return the odd parity bit (0 or 1) so that total number of 1-bits in the 8-bit representation becomes odd.
Parse bit field flags
Write a function that unpacks a bit field integer into a dict of named boolean flags.
Subset XOR sum
Given a list of integers, compute the bitwise XOR of each non-empty subset and return the sum of those XOR totals.
Check kth bit
Implement a function that checks whether the k-th bit of a non-negative integer is set (1) or not (0).
Even Parity Bit
Given an integer, return the even parity bit (0 or 1) that makes the total count of set bits even.
Showing 25–29 of 29 challenges · Bit Manipulation
Bit Manipulation — Python coding challenges
What you will find here
This page lists bit manipulation challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.
Challenges vs tutorials and quizzes
Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.