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 e7bb3a8 commit d872782Copy full SHA for d872782
1920lesson.py
@@ -0,0 +1,34 @@
1
+# Xor RightShift Leftshifi
2
+a = 5
3
+b = 2
4
+c = a^b
5
+# print('Xor value is ', c)
6
+# 5 => 101
7
+# 2 => 10
8
+# 101
9
+# 10
10
+# 00000111
11
+
12
+# Right shift >> more younger
13
+x = 10
14
+y = x>>2
15
+# print('right shift ', y)
16
17
+# x => 00001010
18
+# remove (right2place) and add two zero infront of
19
+# x => 00000010 (Answer)
20
21
+# Left shift << more older
22
+p = 15
23
+t = p << 3
24
25
+# print('Left shift value is ', t)
26
27
+# p => 00001111
28
+# remove lefplace 01111 + 000
29
+# p => 01111000
30
31
32
33
34
0 commit comments