#14 Python Tutorial for Beginners | Python BitWise Operators

preview_player
Показать описание
Check out our courses:

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO20 (20% Discount)

Udemy Courses:

For More Queries WhatsApp or Call on : +919008963671

In this lecture we will learn:
- What are Bitwise operators in Python?
- Different types of bitwise operators
- How operations performed on bits
- Implementation of bitwise operations

#1
- In bitwise operations, the integers are first converted into binary and then operations are performed by bitwise operators on each bit or corresponding pair of bits.
- The result is returned in decimal format by the bitwise operators.
- There are six types of binary operators:-
1. Complement (~)
2. And (&)
3. Or (|)
4. XOR (^)
5. Left Shift
6. Right Shift

#2
- Complement operator is also known as tilde(~) operator.
- Complement simply do the reverse of binary form. If a bit is 0 then it makes it 1 and vice-versa.
- Reverse of each bit of a number returns the 1's complement.
- We can store only positive numbers in our system and that's why we find the 2's complement of each negative number.
2's complement = 1's complement +1

#3
-AND operator will return true if both the conditions are true while the OR operator will return true if at least one condition is true.

#4
- XOR operator will return 1 or true when there is an odd number of 1 bit present in operations and if there is an even number of 1, then it will return 0.

#5
- Leftshift operator shift bits on the left-hand side. The right-shift operator shifts bits on the right-hand side.
- Leftshift add the bits while the right-side removes the bits.

More Learning :

Donation:
PayPal Id : navinreddy20
Рекомендации по теме
Комментарии
Автор

print("nice teacher of python")

jokergaming
Автор

print(" BEST TEACHER OF PYTHON")
Output: Error
Correct output: Most underrated but the BEST GURUJI OF PYTHON and the GOAT

obro-cartoons
Автор

We need lecturers like you in the colleges

farmerfomIndia
Автор

Yes he is the Angel for the programming language, he is teaching very perfectly without doubts and easily in less time thank you so much sir if teachers like you are there in college every student become as a programmer☺

sathi-mutk
Автор

You are the just the bestt..!!!! You are lord of the programming. Seriously I paid thousands to learn python but got no clarity. and look here this is freee and in the best representation!!! thanks naveen sir! you are doing a great job!

easy_abhiyantriki
Автор

I have taken so many paid courses, but never got such a brilliant explanation as clear as water like yours. A teacher can build an entire nation and people like you are the face of India, people like you are directing the young towards success, showing path. That is why we see Indian people at top in Google, top doctors from India all around. This is because you care about the rest of the people of the country, patriotism! You are providing everything for free but in a much better way than our conventional education system. You earned my respect man, from heart!! Great job! Keep doing good to society!

chowdhurym
Автор

When I start learning with you I forget about questions,
You automatically tell everything

nehaaadarsh
Автор

Iam from civil engineering, And i joined in Python Full stack development, But i don't know even basics, After searching good lecture for python, I find one of the best teacher for python is Navin sir, And this sir is teaching from scratch onwards, Now a days iam interested in python becz of you Navin sir 😌

Venu_K
Автор

very good actually this is the toughest one i had reached till now on his playlist of python programming

nimitagarwal
Автор

Wow, you just explained what 4 teachers couldn't explain in years. Just became a fan of your's.

suraimrashid
Автор

That was the best session as of now. I loved the way you make me understand the depth of a concept. I would love to learn from you in your next videos.

Dhananjoybhatta
Автор

<< (left shift) Takes two numbers, left shifts the bits of the first operand, the second operand decides the number of places to shift. Or in other words left shifting an integer “x” with an integer “y” (x<<y) is equivalent to multiplying x with 2^y (2 raise to power y).


>> (right shift) Takes two numbers, right shifts the bits of the first operand, the second operand decides the number of places to shift.Similarly right shifting (x>>y) is equivalent to dividing x with 2^y.

gauravpandey
Автор

One of the best programming teachers on Youtube

farhanaziz
Автор

Easy way to remember the compliment, ~n means -(n+1). Ex: ~6, output will -7. or ~18, output will be -19... :D

chandanhegade
Автор

I always had this problem figuring out the bitwise operators. But now I totally got them. Thank you 😊

vahidrezaarabpour
Автор

My teacher explained this in class today and all I understood were the shifts, now I understand all biwise operators. Thank youuu !

gabs_sauce
Автор

One of the best teachers I've found on youtube. Very clean explanation. Thank you.

Hrit
Автор

i am very scared of coding but after watching your videos I got full confidence in myself that I can also learn programming language. thank you so much sir.

umadevipathiwada
Автор

Wow i have been watching ur videos since 4 days daily and i loved this are the best teacher in u tube .

srikiran
Автор

The good thing about learning from online videos is that you can playback multiple times on things you don't understand at first. Took me a bunch of playbacks to understand how Complement works.

DarkYuugen