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

x
Solved

what is 31 >> 5

Posted on 2014-07-31
Medium Priority
167 Views
#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
Question by:naseeam
• 2

LVL 46

Accepted Solution

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

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

Do you mean 31 instead of 21 ?
0

LVL 46

Expert Comment

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

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
Course of the Month13 days, 12 hours left to enroll