Solved

what is 31 >> 5

Posted on 2014-07-31
3
148 Views
Last Modified: 2014-07-31
#define MAX_NVM_CRPT                        (32)                                /* Total number of corrupt data flags */
#define NVM_MGR_ID_TO_BIT_IDX         (5)

#define NVM_MGR_CRPT_DATA_BUFFER_SIZE                 (((MAX_NVM_CRPT - 1) >> NVM_MGR_ID_TO_BIT_IDX) + 1)
0
Comment
Question by:naseeam
  • 2
3 Comments
 
LVL 45

Accepted Solution

by:
Kdo earned 400 total points
ID: 40232650
Hi naseeam,

>> is the right shift operator.

In your example, 21 would be right shifted 5 places, resulting in zero.

A right shift of 5 places is an integer division by 32.


Good Luck,
Kent
0
 

Author Comment

by:naseeam
ID: 40232722
Yes, it's right shift operator.

Do you mean 31 instead of 21 ?
0
 
LVL 45

Expert Comment

by:Kdo
ID: 40232769
Oops.  Typo on my part.  Good catch.

Yes.  In your example, 31 would be right shifted 5 places, resulting in zero.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now