Saturday, March 31, 2012

Computer Math Jokes

Yeah, I'm not going to get a lot of new readers with a title like that. But anyway.

I was thinking about an old joke:
There are 10 kinds of people: those who understand binary and those who don't.
...and a number of examples of number-formatting trivia came to mind.

(A friend of mine pointed out that even calling our counting system "base 10" is anthropocentric. A computer would claim that we counted in base 1010, and that it was the true representative of base 10. And that would be binary-centric thinking instead of anthropocentric. But I digress. Already.)

Every Java class file begins with the 4-byte hex sequence CAFEBABE. (If that's your kind of humour, fill your boots here.) Ha ha ha, Sun.

Every PCI device (such as disk drive controllers, video cards, USB controllers, and a host of other devices in a typical computer) is identified by a combination of two codes called the PCI ID. The first code identifies the manufacturer, and the second corresponds to a particular product from that manufacturer. Intel's manufacturer code is 8086, an homage to the chip that helped put them at the forefront back in the late 1970s. Ha ha ha, Intel.

There are several ways of encoding text on a computer, and sometimes systems disagree on what system they should be using. You may have seen this happen on the web where accented characters (like é) turn into comic-book swearwords (like é). Apparently the Russian post office managed to figure out an address written entirely in garbled encodings:

And of course, there's a classic literary reference at the heart of every computer. Any multi-byte data (commonly numbers beyond the range of a single byte's 0 to 255 or -127 to 128) can be broken into individual bytes in two ways: either big-endian, with the most significant byte first, or little-endian, with the least significant byte first. (To put it in more comprehensible but less exact terms, think about writing a number on a page. We write the most significant digit first, i.e. one thousand is 1000. If we were little-endian, we'd write 0001.)

The names "big-endian" and "little-endian" come from Jonathan Swift's "Gulliver's Travels" -- most famous of course for its endlessly-lampooned bit with a giant being tied down with string by tiny people. That was during his trip to the land of Lilliput. Another subplot in the same land involved a civil war over which of end a boiled egg should be cracked with a spoon -- big or small.

Swift was satirizing the English conflict between Catholic (big-endian) and Protestant (little-endian) religions. So maybe that's why Apple people and PC people traditionally get along so poorly: historically, Apples are Catholic; PCs are Protestant.

1 comment:

  1. I used to enter DECAFE for the
    Novell Netware Nodes IPX/SPX

    i still got 99% of the software
    but i lack the server.exe -
    Murphy was here, indeed.


Note: Only a member of this blog may post a comment.