We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2e9429 commit 8d2180aCopy full SHA for 8d2180a
src/main/java/com/rampatra/bits/README.md
@@ -0,0 +1,46 @@
1
+## Bits (Work In Progress)
2
+
3
+### Basic Operators
4
5
+AND:
6
+| x | y | x & y |
7
+-----------------
8
+| 0 | 0 | 0 |
9
+| 0 | 1 | 0 |
10
+| 1 | 0 | 0 |
11
+| 1 | 1 | 1 |
12
13
+OR:
14
+| x | y | x | y |
15
16
17
+| 0 | 1 | 1 |
18
+| 1 | 0 | 1 |
19
20
21
+XOR:
22
+| x | y | x ^ y |
23
24
25
26
27
+| 1 | 1 | 0 |
28
29
30
+### Shifts
31
32
+1. Left Shift (<<):
33
34
+ 1 << 3 = 8
35
36
+ 00000001 << 3 = 00001000 (only showing 8 bits)
37
38
+2. Right Shift:
39
40
+ Two types:
41
42
+ a. Signed Right Shift (>>):
43
44
+ b. Unsigned Right Shift (>>>):
45
46
0 commit comments