Python Bitwise Operators | Python Tutorial for Beginners in telugu step by step Part 9

preview_player
Показать описание
#ottit #pythontutorialintelugu
Python Bitwise Operators | Python Tutorial in Telugu | ottit
Bitwise operators works on values based on it’s binary values 0,1
1. & - called as AND – returns 1 only when both bits are 1
var1 & var2
2. | - called as OR - returns 1 when any of the bit is 1
var1 | var2
3. ^ - called as XOR – returns 1only when one of the bit is 1
var1 ^ var2
~ - called as NOT – Returns the complement of value
~var1
Binary Left Shift – moves the bits of number to left by n positions. Value of the number gets *multiplied.
var1 Binary Left Shift n
Binary Right Shift – moves the bits of number to right by n positions. Value of the number gets divided.
var1 Binary Right Shift n
Рекомендации по теме
Комментарии
Автор

Division kabati ... integers lo ki ..velle chances ! 👍

Vtkpravee
Автор

Left shift use chesinappudu .... value perigthundi (Multiple) avuthundi kada,
Same values tho right shift cheste Division ayite avuthundi ..., Ela division ayinappudu minus value vache avkasam unda ?
(Divisions, minus value lo ki convert avuthunda ? Right shifts lo )

Vtkpravee
welcome to shbcf.ru