World Languages, asked by Anonymous, 1 year ago

assume n=10 what will be the result of n>>2

Answers

Answered by aqibkincsem
9

"In arithmetic-logic unit which is inside the CPU, mathematical operations such as: addition, multiplication, subtraction, and division are done in bit-level.


To execute bit-level operations in C programming, bitwise operators are used.

Right shift operator shifts all bits towards right by certain number of specified bits. It is denoted by >>.

"

Answered by vsmsrirangam
1

Answer:

2

Explanation:

for right shift( >> ), you divide any given number ( n ) by 2 constantly the number of times they have asked( k )

Here  it will first be 10/2 = 5 {ignore decimal }

then again divide it by 2 -> 5/2 = 2

Hence it is 2

For example if it was

20>>3, it would be

20/2=10

10/2=5

5/2=2

We divided it thrice here as it said 3 after >>

Similar questions