What does '>>10' mean?

Status
Not open for further replies.

yzou_ua

Member level 5
Joined
Nov 5, 2008
Messages
92
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,869
I'm new in embedded c program and this symbol always bother me, like:

EstimParm.qVIndalpha = ((long)MotorEstimParm.qLsDt * (long)(EstimParm.qDIalpha))>>10;

what is '>>10' for??
 

right shift by 10 times

srizbf
23rdjune2010
 

In C we have left shift and right shift operator.That is bit shift opertaion

>>10 that means 10 right shift.
<<10 that mean 10 left shift.

If you have any query please mail on my personal i.d. I am happy to help you.

Regards
Chanchal
 

It is used to divide the value by 1024 (2^10).
--
Amr
 

Thanks a lot to all of you, guys!

amraldo said:
It is used to divide the value by 1024 (2^10).
--
Amr
 

What is the quote about?
--
Amr
 

Actually, what's the best way to learn programming of embedded c? Any tutorials or just following previous codes written by others??
Thank you.
 

Here enclosed is Programming PIC microcontroller in C pdf. Please check it out.

It will be helpful for you.

Regards
Chanchal
 

There is a book called C by Example. It is really nice.
--
Amr
 

Thx a lot!! It is helpful for sure...

chanchal.chauhan said:
Here enclosed is Programming PIC microcontroller in C pdf. Please check it out.

It will be helpful for you.

Regards
Chanchal
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…