Go Down

Topic: Bitmanipulation (Read 568 times) previous topic - next topic

Stephan

Hallo to all Arduino User/developers,

is a way to manipulate the bits of a predefined Byte?

Like:

Byte(somewhere);
Bit(i) of Byte(somewhere)?;

Thanks for help,

Stephan

mellis

There is, but it's a little complicated.  You need to use the C bit manipulation operators like "|", "&", "^", ">>", and "<<".  This tutorial looks reasonable:
http://www.gamedev.net/reference/articles/article1563.asp

Or if there's a specific task you're trying to accomplish, we can try to help you with some sample code.

Stephan

Thank for this fast reply,

I think i can handle the c-code things.......

Another Question:
Is the entire "Arduino-Language" a part of "C", when so, could one delimit that part which one can use?


Stephan

Go Up