Using || operator instead of |.
Optimised bytesNeeded function with ifelse.

thx to bosie.
no more testing for first parameter.
Some more deateiled infromation to class binary.

New function summary.binary.

optimised function as.raw.binary using packBits.

New function as.integer.binary.
Added some comments to function dec2bin.

some minor changes to increase readability.