C# program to demonstrate the bitwise operations
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Program:
The source code to demonstrate the bitwise operations is given below. The given program is compiled and executed successfully on Microsoft Visual Studio.
Output:
Explanation:
Here, we created a class Bitwise that contains the Main() method. Here, we declared three variables of byte type that are initialized with 10, 2, and 0 respectively.
In the above code, we performed the bitwise AND, bitwise OR, and bitwise XOR operations and printed the result on the console screen.