Solved

what is 31 >> 5

Posted on 2014-07-31
3
145 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
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.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

707 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

15 Experts available now in Live!

Get 1:1 Help Now