Skip to content

Instantly share code, notes, and snippets.

@windytan
Created February 10, 2013 08:38
Show Gist options
  • Save windytan/4748904 to your computer and use it in GitHub Desktop.
Save windytan/4748904 to your computer and use it in GitHub Desktop.
$prevbit = 0;
$n=0;
for (qx!cat ddtaa.asc!) {
chomp($a = $_);
if ($n >= 2300) {
if (($n - 2300) % 80 == 0) {
$bit = ($a > 0) ? 1 : 0;
print (($bit != $prevbit) ? "1" : "0");
$prevbit = $bit;
}
}
$n ++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment