#!/usr/bin/perl # note that %b modifier processes binary. Similarly, %x processes hexadecimal and %o is for octal. use strict; use warnings; my ($move, $pos); $move = 0b1111111111111111; $pos = 0b0000111111111111; printf "%b\n", ($move ^ $pos); #### /* Apologies for using C, but its my "mother-tongue" :P */ #include int main(int argc, char **argv) { int ; for(i = (strlen(argv[1]) - 1); i >= 0; i--){ printf("%c", *(argv[1] + i)); /* reverse a string, a number, a sentence, a novel... */ } }