Link to home
Start Free TrialLog in
Avatar of howardsd
howardsd

asked on

How to clear a nibble?

I'd like  to clear the most significant nibble of a byte??

So far I'm using:

      b1 = 0xC8;
        b2 = b1 << 4;
      b2 = b2 >> 4;

I want to end up with 0x08.

There's got to be a more slick method.
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of howardsd
howardsd

ASKER

Thanks.