Pulling multiple values from an array

I am wondering if I can pull multiple values from an array at once. For example if I want to do bitWrite could I pull multiple values from the array at once like array[bitnumber =>] so any value equal or less than the number. If not how could I have the register have 1 pin set high and all the others lower than it set high.

Sorry if I am not very clear.

I was able to figure it out I just multiplied the byte by 2 then subtracted one.

For example if I want to do bitWrite could I pull multiple values from the array at once like array[bitnumber =>] so any value equal or less than the number.

Not without writing code to do it.

If not how could I have the register have 1 pin set high and all the others lower than it set high.

Well you could write to them using the direct register addressing mode.

No, C doesn't support array slice operations, which I think is what you are wanting.

Some languages support syntax like

  array [a..b]
  array [a..]
  array [..b]

But not C.

memcpy may be an answer, but you have to pass the part size
http://www.cplusplus.com/reference/cstring/memcpy/

You should be able to use the template class std::bitset to access individual bits as an array
http://en.cppreference.com/w/cpp/utility/bitset
This implement I on seems significantly easier than a Union.

There were some caveats with the way the compiler handles memory alignment, I understand, but for an 8-bit uController like the AVR things should be straight forward and should not be complex such as with advanced microprocessors.
[urlhttp://www.ibm.com/developerworks/library/pa-dalign/][/url]

Andy has a few notes about the use of templates