Random Thoughts

My thoughts about life, coding, science, technology and other stuff

A FoxTrot with a binary math puzzle.

This FoxTrot cartoon has a binary math puzzle as an Easter Egg.

read more | digg story

The binary numbers and their decimal equivalents:

01011001 89
01001111 79
01010101 85
01001110 78
01000101 69
01010010 82
01000100 68

Here’s the c# code to decifer it:

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program

{

static void Main(string[] args)

{

    Console.WriteLine(“{0}{1}{2} {3}{4}{5}{6}”, new object[] { (char)89, (char)79, (char)85, (char)78, (char)69, (char)82, (char)68 });
Console.ReadLine();
}
}
}

January 11, 2006 - Posted by bluehouse | Coding | | 14 Comments

14 Comments »

  1. Python. Just because. :-)

    #!/usr/bin/python
    import string

    chars = ( 89, 79, 85, 78, 69, 82, 68 )

    msg = string.join( [ chr(x) for x in chars ], “” )
    print msg

    Comment by linuxlizard | January 11, 2006

  2. Inspired by the concise code linuxlizard posted:

    Console.WriteLine(“{0}{1}{2} {3}{4}{5}{6}”, new object[] { (char)89, (char)79, (char)85, (char)78, (char)69, (char)82, (char)68 });
    This one WriteLine call can replace all the WriteLines in the Main sub. Changed original code to reflect this.  Thanks linuxlizard

    Comment by bluehouse | January 11, 2006

  3. Java, because I can. ;-)

    public class FoxTrot {
    public static void main(String[] args) {
    char[] carr = new char[] { 89, 79, 85, 78, 69, 82, 68 };
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i

    Comment by GMTao | January 11, 2006

  4. [...] Random Thoughts This FoxTrot cartoon has a binary math puzzle as an Easter Egg. [...]

    Pingback by Foxtrot is for nerds! at The Cramer Family | January 11, 2006

  5. A little more concise java example

    public class FoxTrot {
    public static void main(String[] args) {
    char[] c = new char[] { 89, 79, 85, 78, 69, 82, 68 };
    System.out.println(c);
    }
    }

    Comment by cramer | January 11, 2006

  6. How about some Excel?

    =CHAR(89)&CHAR(79)&CHAR(85)&CHAR(78)&CHAR(69)&CHAR(82)&CHAR(68)

    or, using the Analysis ToolPak add-in functions:

    =CHAR(BIN2DEC(1011001))&CHAR(BIN2DEC(1001111))&CHAR(BIN2DEC(1010101))&CHAR(BIN2DEC(1001110))&CHAR(BIN2DEC(1000101))&CHAR(BIN2DEC(1010010))&CHAR(BIN2DEC(1000100))

    Comment by Tim | January 11, 2006

  7. Ruby one liner:

    [ 0b01011001, 0b01001111, 0b01010101, 0b01001110, 0b01000101, 0b01010010, 0b01000100 ].each { |b| print b.chr }

    Comment by PhantomMongoose | January 11, 2006

  8. vbscript because i can,

    msgbox chr(89) & chr(79) & chr(85) & chr(78) & chr(69) & chr(82) & chr(68)

    Comment by BinaryCortex | January 11, 2006

  9. by hand because i can:

    01011001
    64 + 16 + 8 + 1 = 89

    01001111
    64 + 8 + 4 + 2 + 1 = 79

    01010101
    64 + 16 + 4 + 1 = 85

    01001110
    64 + 8 + 4 + 2 = 78

    01000101
    64 + 4 + 1 = 69

    01010010
    64 + 16 + 2 = 82

    01000100
    64 + 4 = 68

    Comment by doug | January 11, 2006

  10. PHP, because I can:

    print chr(89).chr(79).chr(85).chr(78)
    .chr(69).chr(82).chr(68);

    Comment by Alan J Hogan | January 12, 2006

  11. Thanks for all the feedback everyone. I love seeing all these different ways of doing this.

    Comment by bluehouse | January 12, 2006

  12. Shorter Python, because… no, that’s got old now.

    print “”.join([chr(x) for x in (89, 79, 85, 78, 69, 82, 68)])

    Comment by Twey | April 24, 2007

  13. deposit free bonus casino
    see to signature…

    Comment by casinosfreebonusesv | August 12, 2007

  14. popular free ringtones

    http://www.thehotstop.info

    signature…

    Comment by freeeeringtones | August 18, 2007


Leave a comment