Advertisement

04.01.2008 at 11:28AM PDT, ID: 23286783
[x]
Attachment Details

Why does left operand of left shift expression require unsigned suffix?

Asked by naseeam in C Programming Language

We program Freescale MPC500 Family Microcontrollers in 'C' langauage with gcc compiler.  

Please consider following expression:

#define MAS1_VALID  (1u << 31)

Why is unsigned suffix needed here?

Thanks.Start Free Trial
[+][-]04.01.2008 at 11:31AM PDT, ID: 21256709

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.01.2008 at 12:46PM PDT, ID: 21257411

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.01.2008 at 01:24PM PDT, ID: 21257759

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C Programming Language
Sign Up Now!
Solution Provided By: Infinity08
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628