February 2020
Beginner to intermediate
616 pages
15h 16m
English
This right-shifts the binary digits of the operand by the specified number of bits, and the empty space created after the most significant bits is filled with 0s.
Assuming that operand A has a value of 00001010, then right-shifting A by 2 bits (A>>2) will give us the following:
| A | 00001010 |
| A>>2 | 00000010 |
You can see that on right-shifting, the least significant bits are dropped off. On every right-shift, the value of the operand is divided by powers of 2. That is, if the operand is right-shifted by 2 bits, that means it is divided by 2 x 2, that is, 4.
Let's go on to gain some practical knowledge by making some working recipes. The first recipe is next.
Read now
Unlock full access