What do these C expressions mean? Don't recognize these operators.

I am trying to learn embedded C for the HCS12 processor.  Come across a few operators I haven't seen before.  What do the symbols in these four expression mean?

PPSAD &= ~0x01;   // pull-up on PAD0
PERAD |=  0x03;   // enable pull-up and pull-down
column>>=1;  //shift into position

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

& is the binary AND operator.
| is the binary OR operator.
>> is the binary right-shift operator.
Oh, and ~ is the binary NOT operator.
And -> is the dereference with member selection operator.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

PPSAD = PPSAD & ~0x01;  // bitwise and of  PPSAD with bitwize complement of 0x01
PERAD = PERAD | 0x03; // bitwise or of PERAD with 0x03
column = colums>>1; // shift column one bit to the right.  equivalent to unsigned division by 2
while((*pt).out)  dereference pt and get .out field

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Or, with a bit more explanation :

1) binary AND : takes the binary AND of two values. For example :

        0xAA & 0x0F == 0x0A

2) binary OR : takes the binary OR of two values. For example :

        0xA0 | 0x0F == 0xAF

3) binary NOT : takes the binary NOT of a value. For example :

        ~0x0000FFFF == 0xFFFF0000

4) binary right shift : shifts the bits in a value a given number of positions to the right. For example :

        0xA0 >> 4 == 0x0A

5) pt->out is the same as (*pt).out   or, dereference pointer to struct pt, and get the member out of that struct.
Oh well, so I guess what I said wasn't helpfull ...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.