View Single Post
Re: An odd question...
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: An odd question... - 15-08-2005

If you have lines of 32 bits you have 4 bytes per line. So the bit A on line B will be the 32*B+A bit of your flattened array. To find which byte it is from, divide that by eight and round it down.

rotate bits in C ? Use the << and >> operators. But be aware that the leftmost and rightmost bits are lost, so if you want them to reappear at the other side of the word, you have to put them there manually.

I really think you should sleep more, maths look much simpler when looked at through wide open eyes and with a fully operational brain



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote