![]() |
| ||
| Need Some Bit Twiddling Help on File Post Processing Hi, I am struggling with the best way to twiddle a large number of bits. What I have is a large amount of binary files(~100) in my directory that I need to do post processing on. I want to compare all the bytes in each file and see when the bytes have changed and then assign it a value. For example, File 1:byte[0] = 0000 0110 I see that bit 2 for byte 0 of File 2 flipped bits changed from a 1->0. When this happens I want to note that byte0, bit 2 is assigned the value of File 2. I want to do this for every single byte in all the binary files. Basically, what I am doing is a current schmoo. So File 1 is the binary dump being read at a specific current, and File 2 is another current and so forth. I want to see when the bits flip to determine what current the bits are at. So if I see a bit flip from 1->0 on File 56 then I know that the bit has a current of the File 56 value. I was thinking of doing an XOR with the bytes but I thought I heard something about XOR operation being slow, so I was trying to think of some bit shifting technique. I am dealing with a lot of files so I want to find some technique that will process the data quickly. Can anyone help? Thanks!! |
| All times are GMT -4. The time now is 11:41 am. |
Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC