how to bitwise negate a binary file?

Michael Kann mikekann at
Wed Sep 7 21:42:54 EDT 2011

repeat for each char c in negated_binary_file
put charToNum(c) into x
put numToChar(255-x) after fixed_binary_file
end repeat

--- On Wed, 9/7/11, Matthias Rebbe <matthias_livecode_150811 at> wrote:

From: Matthias Rebbe <matthias_livecode_150811 at>
Subject: how to bitwise negate a binary file?
To: "How to use LiveCode" <use-livecode at>
Date: Wednesday, September 7, 2011, 5:23 PM


i have here some binary files, which were negated bitwise. How can i "convert" them back?
Is there a livecode function i can use?

Or do i have to 
convert the binary file to hex, 
convert each byte to decimal,
convert each "decimal"byte value  with "bitNot",
reconvert to hex and then convert to binary again?

Any ideas?


use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list