04-26-2007 06:55 AM
04-26-2007 07:16 AM
traditional bit extraction id done with bitwise anding. that is to see if the 3rd bit is set and the 8 bit number with 2^3 or 00000100.
if the result is =0 then the bit was 0 else the bit was 1. do this for each bit and recombined them at the end. you also can change a 8bit number to an array of booleans and deal with them that way, but that is less efficeint.
Paul
04-26-2007 07:19 AM - edited 04-26-2007 07:19 AM
Message Edited by dan_u on 04-26-2007 02:20 PM
04-26-2007 08:13 AM
04-26-2007 11:29 AM - edited 04-26-2007 11:29 AM
Message Edited by altenbach on 04-26-2007 09:30 AM
04-27-2007 12:35 AM
Thank you all for ur help.
Dan i was trying the same thing what u have sent me... the problem is at input.... i have to input the data directly from file i.e. i will mention the file path as the file already exists...from that file the code should read data byte by byte (to extract particular bit from each byte in a group of 8 bytes) and then make another data byte and write it in new file.
please help
regards
vivek modgil
04-27-2007 01:14 AM
04-27-2007 01:17 AM - edited 04-27-2007 01:17 AM
Message Edited by dan_u on 04-27-2007 08:18 AM
04-27-2007 01:25 AM
04-27-2007 02:22 AM
Vivek,
What is there, even if you dont have 8.21 ?
He has attached a screenshot for users like us only that dont have the latest version.
Code it yourself similarly & update here for the results you get.