Commit d4f30ca
committed
feat: Add Bitwise5 class demonstrating right shift operation
Add a program that:
- Initializes an integer using a binary literal
- Applies a right shift (`>>`) by 1 bit
- Prints the result, showing how bits move right and value is halved
- Demonstrates the use of right shift in Java's bitwise operations1 parent 446ce79 commit d4f30ca
1 file changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | | - | |
5 | | - | |
| 3 | + | |
6 | 4 | | |
7 | 5 | | |
8 | | - | |
| 6 | + | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | | - | |
| 19 | + | |
0 commit comments