filmov
tv
Bitwise Operations on Integer Types in Python
Показать описание
#RouthKiba
Logic operators checks comparison operation or value but these bitwise operation checks the bits and does the operation and the result in form of integer to get clarity you need to convert to binary so use bin(), and these left shift and right shift which shift the bits of x based on n value.
Example let's take x = 12
when you have x right shift 2 that means x bits moves right by two bits.
To support this channel:
Like, Share and Subscribe.
Logic operators checks comparison operation or value but these bitwise operation checks the bits and does the operation and the result in form of integer to get clarity you need to convert to binary so use bin(), and these left shift and right shift which shift the bits of x based on n value.
Example let's take x = 12
when you have x right shift 2 that means x bits moves right by two bits.
To support this channel:
Like, Share and Subscribe.