Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What does the Bitwise AND operator (&) do?
Think of AND in logic.
What is the result of 5 | 3?
Convert both to binary and use OR on each bit.
What does the bitwise operator ~ do?
It's like flipping a coin.
True or False: The Bitwise OR operator (|) can be used to clear bits.
Think about how OR works in boolean logic.
Given two integers a = 12 and b = 5, calculate and explain the result of a & b and a | b.
Write the binary forms and perform operations.
How would you use bitwise operators to check if a number is even or odd?
Recall what it means to be even or odd in binary.
7 more questions in this section. Enroll free to practise them all.
Enroll free