why do programmers confuse halloween and christmas
ÁWhy do programmers always mix up Christmas and Halloween. á Because Dec 25 is Octá 31Á
Get it? á If you do, then you should probably stop reading here because this is likely to be old news to you. á If youÁd like to know why itÁs so damned funny, and learn a little computing basics for good measure, read on! If youÁre not a programmer, you (hopefully! ) recognise the abbreviations for December 25th (Dec 25) and October 31st (Oct 31), and (hopefully!! ) recognise them as Christmas and Halloween. á So far, so good, but not very funny even to a programmer. To a programmer, the abbreviations ÁDec 25Á and ÁOct 31Á can also mean something entirely different. á Dec 25 is an abbreviation for ÁDecimal 25Á and ÁOct 31Á is an abbreviation for ÁOctal 31Á, and for reasons that IÁd like to explain, these are exactly the same thing. To see why, letÁs start at looking at the normal decimal number system the number system we use in day-to-day life. á Decimal is simply a way of counting or more precisely, of representing, numbers in blocks of ten. á In day-to-day use we use the arabic numerals 0 through to 9 to represent the English numbers ÁzeroÁ through to ÁnineÁ. á After nine, we start counting in units of ten, so ten is 10, eleven is 11, twelve is 12 and so forth. á After ninety-nine, we start with another block of 10, so hundred is 100, one-hundred and one is 101 and so on and so forth.
This is, of course, fairly elementary stuff itÁs the kind of thing weÁre all taught in primary school. á As an aside, this, unfortunately, is also one of those things that everyone knows so instinctively that they stop thinking about how numbers work. á 10 is ten. 12 is twelve, and thatÁs all there is to it. á ItÁs so ingrained that itÁs easy to forget what an inspiration the arabic numbering system actually is and how out of kilter with our actual counting system it is. Okay, so when we say Átwenty fiveÁ, we write out the arabic numerals 2 and 5, representing 2 x 10 + 5. á When we say Áthirty oneÁ, we do the same thing: 3 x 10 + 1. But why stop at 10? á Why should the arabic numerals Á31Á necessarily represent the number thirty-one. á What if for reasons that I will shortly explain I want each column to represent a multiple of a different number? á What if I wanted each column to represent multiples of 8? There is absolutely nothing stopping us from doing that, and that is precisely what Octal is. á In Octal, the numbers zero through to seven are represented in the normal way: 0, 1, 2, 3, 4, 5, 6 and 7. á When we get to eight though, things get slightly skewed. á Eight in Octal is represented by the arabic numerals 10. á Remember, each column is representing multiples of eight, not multiples of ten; so 10 is Octal is 1 x 8 + 0 Eight. á And we carry on from there: nine is 11, ten is 12, eleven is 13, and so forth 20 is sixteen, and 31 is 3 x 8, which is 24, plus 1 which gives us twenty five. (Incidentally, I bet youÁre reading that and your mind is reading it as, Áso ten is [twelve], eleven is [thirteen] and so forth. á Try to think of each arabic numeral as an independent figure: Áso ten is [one, two], eleven is [one, three]Á) So thatÁs the joke in a nutshell:á to a programmer, the number represented by the arabic numerals Á25Á (two, five) in decimal is the same as the number represented by the arabic numerals Á31Á (three, one) in octal, because 2 x 10 + 5 is the same as 3 x 8 + 1. á ItÁs simply an amusing coincidence that, to the programmer, Dec can mean both ÁDecemberÁ and ÁDecimalÁ, and Oct can mean both ÁOctoberÁ and ÁOctalÁ; and that Dec 25 is just happily, and coincidentally, Oct 31.
But thatÁs not a truly satisfying answer; the obvious question is why would anybody want to do that? á WhatÁs the point?
If 10 is ÁtenÁ, then why would anyone find any use in 10 being ÁeightÁ? á We all have ten fingers, itÁs easy to count in tens, so why change things and count in eights? The answer lies in how computers store numbers. á Computers, you see, donÁt count in tens. á Computers count in ÁonÁ and ÁoffÁ. Welcome to! Guidelines and Information Offensive jokes are fine as long as they are still jokes. We do make exceptions for extremely offensive jokes. Keep the comment section civil and light hearted. Personal attacks will not be tolerated. If you want to be a dick, go to Jokes must be in text format, no linking allowed. (YouTube, Imgur, etc) Reposts will be removed at our discretion. If you post a NSFW image/link in the comments, it must be tagged as NSFW (Nudity/gross images) or NSFL (Gore/extremely disturbing images, and only if relevant to the conversation) These are jokes. Some of them are old, and as such reflect the tone of the times. Some of them are new, and just as offensive. Unless it s spam, it stays. If you find certain comments or submissions here offensive, the best way to address it is with more speech.
- Views: 10
why do we use e g for example
why do we abbreviate pounds as lbs
why do we open presents on christmas
why do we need to study programming language
why do we abbreviate pounds as lbs
why do we use am and pm
wi is the abbreviation for what state