Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

what is 31 >> 5

Posted on 2014-07-31
3
Medium Priority
?
167 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 46

Accepted Solution

by:
Kent Olsen earned 1600 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
 
LVL 1

Author Comment

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

Do you mean 31 instead of 21 ?
0
 
LVL 46

Expert Comment

by:Kent Olsen
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
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…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

963 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