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