Login Register






Tutorial Bit masking and shifts filter_list
Author
Message
RE: Bit masking and shifts #13
(08-31-2015, 07:18 AM)0xDEAD10CC Wrote: It's also still easy to create a bit rotation macro without the ASM:
Code:
#define rotr(x) ((((x) & 1) << 7) | (((x) & 0xFE) >> 1)) #define rotl(x) (((x) & 0x80) >> 7) | (((x) & 0x7F) << 1)

Yes, but that is bit rotation without carry. C exposes no access to the carry bit without use of assembly, therefore it is not possible to create a true rotate through carry or shift through carry.

It amuses me how you vanish until I make a post in the coding forum, and you have to attempt to 1-up me.

Reply





Messages In This Thread
Bit masking and shifts - by phyrrus9 - 08-30-2015, 08:31 PM
RE: Bit masking and shifts - by dotcppfile - 08-30-2015, 10:32 PM
RE: Bit masking and shifts - by phyrrus9 - 08-30-2015, 11:25 PM
RE: Bit masking and shifts - by dotcppfile - 08-30-2015, 11:30 PM
RE: Bit masking and shifts - by phyrrus9 - 08-31-2015, 12:14 AM
RE: Bit masking and shifts - by Eclipse - 08-31-2015, 12:41 AM
RE: Bit masking and shifts - by phyrrus9 - 08-31-2015, 12:43 AM
RE: Bit masking and shifts - by dotcppfile - 08-31-2015, 01:41 AM
RE: Bit masking and shifts - by Eclipse - 08-31-2015, 01:51 AM
RE: Bit masking and shifts - by dotcppfile - 08-31-2015, 02:00 AM
RE: Bit masking and shifts - by phyrrus9 - 08-31-2015, 02:05 AM
RE: Bit masking and shifts - by 0xDEAD10CC - 08-31-2015, 07:18 AM
RE: Bit masking and shifts - by phyrrus9 - 09-01-2015, 01:22 AM
RE: Bit masking and shifts - by 0xDEAD10CC - 09-02-2015, 03:50 PM
RE: Bit masking and shifts - by dotcppfile - 09-02-2015, 04:38 PM
RE: Bit masking and shifts - by 0xDEAD10CC - 09-02-2015, 08:43 PM
RE: Bit masking and shifts - by phyrrus9 - 09-03-2015, 12:50 AM
RE: Bit masking and shifts - by dotcppfile - 09-03-2015, 11:43 AM
RE: Bit masking and shifts - by 0xDEAD10CC - 09-03-2015, 01:26 AM
RE: Bit masking and shifts - by 0xDEAD10CC - 09-04-2015, 01:14 AM
RE: Bit masking and shifts - by dotcppfile - 09-04-2015, 01:22 AM
RE: Bit masking and shifts - by Coca. - 09-10-2015, 01:10 AM