javasaurus: (Default)
[personal profile] javasaurus
Found on the net...

Question:

Why do computer programmers confuse Hallowe'en and Christmas?

Answer:

Because oct31=dec25.

Date: 2005-10-19 04:23 pm (UTC)
From: [identity profile] wilhelmina-d.livejournal.com
OK - I don't get it. I thought maybe that oct=8 and dec=10, but 8 x 31 = 248 and 10 x 25 = 250, so that doesn't make since. I also thought maybe it was adding, but 8+31=39 and 10+25=35, or 10+31=41 and 12+25=37.

So, I'm at a loss. Can you please translate? :)

Date: 2005-10-19 04:39 pm (UTC)
From: [identity profile] acroyear70.livejournal.com
oct = octal notation -- the only digits you have are 0-7, so "10" = 8 and "20" = 16, "100" = 64.

hex is the same, with 16 numbers per digit, 0-9, A=10, F=15.

dec is decimal, at its latin root: dec = 10. its the number system we normally use.

so where oct 31 = 3*8 + 1 = 25.

dec 25 = 2 * 10 + 5 = 25.

oct and hex are standards in computers, especially at the hardware level, because it makes dealing with "binary" (where instead of 10, 8, or 16, each digit represents 2) much easier.

i can go hex2A instead of 00101010 and its much easier to see what's happening for us with experience at these things.

Date: 2005-10-19 05:50 pm (UTC)
From: [identity profile] wilhelmina-d.livejournal.com
Huh. Interesting. Learn something new every day!

Date: 2005-10-19 04:42 pm (UTC)
From: [identity profile] javasaurus.livejournal.com
sure!

In the decimal number system (what we normally use), the first number (on the right!) is how many ones we have, the second is how many tens, and the third is how many hundreds. So with 347, we have 7 ones plus 4 tens plus 3 hundreds.

With octal (also called base 8), we still have ones on the far right, then eights (instead of tens), then sixty-fours (instead of hundreds). So oct245 would be 5 + 4x8 + 2x64, or 165 in decimal.

So oct31 is three eights plus one, or twenty-five in decimal.



Date: 2005-10-19 06:13 pm (UTC)
From: [identity profile] javasaurus.livejournal.com
Also, as a bit of trivia, in base 13, 9 x 6 = 42

Date: 2005-10-20 03:16 am (UTC)
From: [identity profile] cozit.livejournal.com
Ow!

(of course you do realize that I've got a compulsion to share that joke with my up-and-coming-geek of a son... hopefully I'll forget it by tomorrow morning...)

Profile

javasaurus: (Default)
javasaurus

June 2012

S M T W T F S
     12
3456 789
101112 13141516
17181920212223
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 11th, 2025 10:39 pm
Powered by Dreamwidth Studios