We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51cfe39 commit 50211a7Copy full SHA for 50211a7
src/main/java/com/rampatra/bits/README.md
@@ -32,11 +32,14 @@
32
33
### Shifts
34
35
+_Disclaimer: We are taking `byte` (8 bits) as our datatype to explain the
36
+ concepts instead of the usual integer._
37
+
38
#### 1. Left Shift (<<):
39
40
1 << 3 = 8
41
-> 00000001 << 3 = 00001000 (only showing 8 bits)
42
+> 00000001 << 3 = 00001000
43
44
#### 2. Right Shift:
45
@@ -58,7 +61,6 @@
58
61
59
62
> 001000000 >>> 2 = 00010000
60
63
--64 >>> 2 =
64
+-64 >>> 2 = 56
65
-> 111000000 >>> 2 = 00010000
-
66
+> 111000000 >>> 2 = 00111000
0 commit comments