Originally posted by fastmonkey
Ok, I feel embarassed asking but, explain please. How about an example of a bit pattern....I don't recall what that is...man if we went over this and I don't remember I really am out of practice.
No need to feel embarassed. The program will involve some lower level C stuff to do. Definitely bit shifting and stuff like that. As far as bit patterns, I mean say the user wants to get the bit pattern for short. Typically a short is composed of 2 bytes. So, if the user entered 45 for his short. You program would produce:

0000000000101101 [ Big-Endian ]
(edit: oops, only had 1 byte orginally, needed 8 more zeros for the additional byte)

Don't worry about little-endian for now, just get it working like that for starters. If you think this is a little to advanced for you perhaps I can give some other examples? This is just was off the top of my head. If you need some help, just let me know.

edit: Binary pattern , bit patterns its all the same