Convert 00010000 to 11110000......how?
- From: farnaz.shahed@xxxxxxxxx
- Date: 31 Aug 2006 12:03:31 -0700
Hi,
This what I'm basically supposed to do. If i have a byte which looks
like this 00010000, i need to convert it to 11110000. That would mean
if any of the bit fields is 1....all the bit fields to the left of it
should be made 1.
I tried using left shift n right shift operators but that didnt
help...any other suggesstions pls?
Thanks,
Doubty
.
- Follow-Ups:
- Re: Convert 00010000 to 11110000......how?
- From: Michael Mair
- Re: Convert 00010000 to 11110000......how?
- From: Christopher Benson-Manica
- Re: Convert 00010000 to 11110000......how?
- From: Eric Sosman
- Re: Convert 00010000 to 11110000......how?
- From: Ben Pfaff
- Re: Convert 00010000 to 11110000......how?
- Prev by Date: Re: [newbie] strcpy, strtok and strcat problem...
- Next by Date: Re: c code reusability
- Previous by thread: [newbie] strcpy, strtok and strcat problem...
- Next by thread: Re: Convert 00010000 to 11110000......how?
- Index(es):