Not just look at the next type of operators called big shift operators like because operators big shift 2
operators also work with individual bits of its opponents as the name implies big shift operators simply 3
shift Becs that is that operands must be integers and if you consider that binary representation then 4
the big shift operators can shift the bits in either left or right direction. 5
Are the three big shift operators courses left shift operator who are the other two are right shift 6
operators and Mongar right shift operators. 7
One is unsigned when the other is signed. 8
Let's not look at each of these operators I just love shift operator it's a binary operator and it left 9
shift left operand by the number of bits specified on right and here's an example let's just consider 10
the value of six along with its binary representation and full 32 bits not let's say you want a left 11
shift 6 by 1 then here is a send backs. 12
And as you can see all the bits are shifted by one position to what's left after performing left shift 13
the resulting binary number corresponds to the symbol table. 14
So it's Burts get shifted leftwards. 15
We need to fill the newly genitor empty slots with love shift operator zeroes are inserted in those 16
slots. 17
End up playing the fifth operator is same as multiplying by by ourself to for example if you left for 18
six by one then it is same as multiplying by two to the power of one which will result in quote as we 19
saw in our example Similarly you feel left shift six by three then the same as multiplying by two to 20
the power of three so that's the left shift operator next is unsigned right shift operator and it just 21
does the exact opposite of left shift operator that is it right shifts left operand. 22
But the number of bits specified on write and do do right shifting the higher order positions which 23
are on the left side are empty now on they will get filled by zeros and here's an example let's consider 24
the value it will along with its binary representation. 25
No let's say me wandered right shift one by one you can see that all the bits are shifted by one position 26
to what's right and after performing right shift the resulting binary number corresponds to their decimal 27
6 on the plane right shift operator is same as division by powers of two for example if you write you 28
off one by one then it is same as dividing by two to the power of one which will result in six as we 29
saw in our example. 30
So well left of course sponsored a multiplication by powers of two. 31
Unsigned right shift corresponds to division by powers of two the find that open it is signed right 32
shift operator and it does seem as unsigned right shift operator but since this is signed right shift 33
the higher order batch are not bothered with it must be that is the most significant bit instead of 34
zeroes so basically sign this episode here and here's an example where we have a very large negative 35
number not let's say you want to write this number by 4 so we can see that the digits are shifted right 36
by 4 positions. 37
Since the MSP is 1 the fourth highest order bit positions are not fairly Ridwan since the sinus preserve 38
the resulting number is still I negative. 39
Engender for all big shift operators regardless of whether it is left or right shift always remember 40
that the left operand indicates the number two Bishopsgate writing the right operand. 41
That's by Homan the birch the left operand should be Schefter know the most important and interesting 42
part that is viridis operators audio One videos during compilation process compilers us Patoff optimisation 43
Mary-Alice multiplications and divisions with appropriate big shift operations which are much more faster 44
. 45
Like in the case of bitwise operators they're also used in Java's has a structure which is an implementation 46
of hash table. 47
Hash map and has table will be discussed later when covering the structures big shift operators like 48
because operators are also heavily used in embedded programming and they're also used in games programming 49
where performance is critical. 50
They're also used in systems that do not have floating point support in hardware if you're interested 51
you can check out the supplementary notes in the resources section heading towards a link to an interesting 52
discussion on applications or big shift operators. 53
Some of these points are also discussed the look at it and bitwise operators big shift operators can 54
also be expressed using the comp on assignment notation. 55
Here you can see both the expanded form as well as the shorter comp on notation. 56
And that's about it bit shift operators mainly shift births in either left out of I did actions performing 57
left shift is same as multiplying by the power of two while performing unsigned right shift is same 58
as division bipolar self-dual and that's about it. 59
And thank you