A FoxTrot with a binary math puzzle.
This FoxTrot cartoon has a binary math puzzle as an Easter Egg.
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();
}
}
}
14 Comments »
Leave a comment
-
Recent
- Bush sings U2
- Inflatable spacecraft launches from Russia
- Darth Vader Calls the Emperor
- Why increase minimum wage when you can vote yourself a raise?
- Colbert in Action
- Slow motion beer cannon footage
- Give a dog a bone – over the internet
- Super Mario Brothers Themepark
- Search on Microsoft main page doesn’t work in Firefox
- Singularity – The c# OS
- Skype Wrapper for .NET Beta
- Ricky Manning Jr’s PR Machine
-
Links
-
Archives
- July 2006 (2)
- June 2006 (4)
- May 2006 (5)
- April 2006 (5)
- March 2006 (6)
- February 2006 (22)
- January 2006 (31)
-
Categories
-
RSS
Entries RSS
Comments RSS
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
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
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
[...] 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
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);
}
}
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))
Ruby one liner:
[ 0b01011001, 0b01001111, 0b01010101, 0b01001110, 0b01000101, 0b01010010, 0b01000100 ].each { |b| print b.chr }
vbscript because i can,
msgbox chr(89) & chr(79) & chr(85) & chr(78) & chr(69) & chr(82) & chr(68)
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
PHP, because I can:
print chr(89).chr(79).chr(85).chr(78)
.chr(69).chr(82).chr(68);
Thanks for all the feedback everyone. I love seeing all these different ways of doing this.
Shorter Python, because… no, that’s got old now.
print “”.join([chr(x) for x in (89, 79, 85, 78, 69, 82, 68)])
deposit free bonus casino
see to signature…
popular free ringtones
http://www.thehotstop.info
signature…