Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

RE: [AVR-Chat] Exclusive or

RE: [AVR-Chat] Exclusive or

2004-06-19 by Dave Hylands

I think that the fastest way is to have a sixteen entry lookup table,
where the answer is precomputed and stored.

You could also store a 16 bit value, where each bit position holds the
answer and use something like (in C):

Lookup & ( 1 << val )

Where lookup is the 16 bit bit vector and val is the 4 bit value you're
trying to extract. I think this is slower, but would take up less
memory.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/ 
Show quoted textHide quoted text
> -----Original Message-----
> From: David VanHorn [mailto:dvanhorn@cedar.net] 
> Sent: Friday, June 18, 2004 8:47 PM
> To: AVR-Chat@yahoogroups.com; AVR-Chat@yahoogroups.com
> Subject: [AVR-Chat] Exclusive or
> 
> 
> 
> What's the fastest way to get the exclusive or, of four bits 
> in a register?
> 
> 0000 = 0
> 0001 = 1
> 0010 = 1
> 0011 = 0
> 0100 = 1
> 0101 = 0
> 0110 = 0
> 0111 = 0
>  and so on...
> 
> Not for a parity generator, but I think it ends up as the 
> same problem.

HS-300 servo motor

2004-06-19 by Ridho Alpha

helllo

i'm a bit confused with HS-300 servo motor...
how long the length of the pulse for clokwise and
counter clockwise????
the neutral is 1500 uS, isn't it??

please help me

thank yaou

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.