Re: portable way to get highest bit set?
Lew Pitcher <[email protected]> Wed, 11 Oct 2023 14:54:32 -0000 (UTC)
| Newsgroups | comp.lang.c,alt.comp.lang.c |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
On Wed, 11 Oct 2023 01:56:49 -0500, candycanearter07 wrote: > Hi, > > What is the best/most portable way to get the highest bit set? > > ie. 011010001 to 010000000 What have you tried? I can think of one way, but it may not be the "best" or "most portable" way of setting the highest bit of a value, and it /does/ have some limitations. Show your work, and I might show mine. -- Lew Pitcher "In Skills We Trust"