Bitwise Presentation
Bitwise Presentation
Syntax :- ~ op1
Operand types:-
1) int
a=5 00000101
2) binary
print(~a)
Left shift (‘<<’) :-
Left operand value is moved to left by the value of
bits present in right operand.
Syntax:- value << n
0 0 0 1 0 1 0 0
Right shift (‘>>’) :-
Left operand value is moved to right by the value of
bits present in right operand.
Syntax:- value >> n
0 0 0 0 0 0 0 1