Home
Online Courses
Offline Courses
Internships
Contests
Challenges
Quizes
Login / Register
📘 Quiz
Test your skills & challenge yourself 🚀
Quiz
Technical
Bitwise Operations
Bitwise Or
Question
1
/ 1
1:00
1
The expression (15 | 7) would produce
0:00
17
3
11
15
Solution:
Step 1: First, we need to understand the bitwise OR operation. Step 2: The binary form of 15 is 1111 and of 7 is 0111. Step 3: Performing the bitwise OR operation: 1 (from 15) | 0 (from 7) = 1 1 (from 15) | 1 (from 7) = 1 1 (from 15) | 1 (from 7) = 1 1 (from 15) | 1 (from 7) = 1 Step 4: The binary result is 1111. Step 5: Converting 1111 to decimal: (1*2^3) + (1*2^2) + (1*2^1) + (1*2^0) = 8 + 4 + 2 + 1 = 15. Step 6: Therefore, the result of 15 | 7 is 15.
Previous
Next
Submit Quiz
📊 Questions Status
1