delorie.com/archives/browse.cgi | search |
Date: | Mon, 1 Feb 1999 08:58:12 +0200 (IST) |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
X-Sender: | eliz AT is |
To: | anarko <anarko AT flashback DOT net> |
cc: | djgpp AT delorie DOT com |
Subject: | Re: can i do bit rotation in C? |
In-Reply-To: | <11125.990201@flashback.net> |
Message-ID: | <Pine.SUN.3.91.990201085736.27193F-100000@is> |
MIME-Version: | 1.0 |
Reply-To: | djgpp AT delorie DOT com |
On Mon, 1 Feb 1999, anarko wrote: > one thing i want to do is rotate a char value's bits, like > the x86 assembly instruction ROR/ROL does. > is this possible with an operator, or do i have to use inline > assembly for that? There's no built-in bitwise rotation operator in C to do this. But you don't have to go to assembly, just use other bitwise operators, like shift, and, or, etc.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |