Programmers confuse Halloween and Christmas because in number base systems Oct 31 = Dec 25. Halloween is celebrated on October 8th and Christmas on December 25th.
Oct and Dec are number bases which means Octal and Decimal respectively. Converting Oct 31 to Decimal, yields Dec 25.
About Halloween and Christmas
October 31 is a day of the year in which people in over 31 countries observe a holiday in commemoration of the eve before All Saints’ day.
Halloween is a compressed form of All Hallows’ eve.
On this day, people tend to wear several costumes and observe several cultures that include playing harmless pranks, parties, and also treating neighbors to goodies.

On the other hand, Christmas is a form of a festival celebrated on the 25th of December every year by Christians to mark the birth of Jesus.
The word Christmas is coined from the phrase “mass on Christ’s day.”
Both Halloween and Christmas are holidays with great importance.

Number Bases
Numbers are expressed in different number bases like octal, decimal, hexadecimal, and so on.
These base systems are expressed by their Latin name.
Example: 8 in Latin is Octal, 10 is Decimal, 16 is hexadecimal, two is binary, etc.
Octal is a number base system in base 8, and it is abbreviated to “Oct,” while Decimal is a number base system in base 10, abbreviated to “Dec.”
The Decimal is the popular base system which we are all familiar with.
A base number system has as many digits as the figure of the base number. That means base ten will have ten digits, i.e., 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
At the same time, the octal base system will have a total of eight digits which include 0, 1, 2, 3, 4, 5, 6, and 7.
Oct 31 = Dec 25 EXPLANATION
Things are about to get a little bit mathematical here, but not to worry, it will not exceed the basic knowledge that we all have.
The height of it will be the basic multiplication, addition, and probably division.
Now let us jump right into it.
Let us start with Oct 31.
Oct 31 is the same as Octal 31, which means 31 in base 8.
Now we need to convert 31, which is in base 8, to another base which is the decimal base.
To do this, we will give each digit in figure 31 a subscript starting from the right. The subscript will start from zero.
– Converting 31 in Base 8 to Base 10
(31 10 )base 8 = (3 x 81) + (1 x 80) = 24 + 1 = 25
Since 25 is a base 10 value, it can be written as 2510 or Dec 25
This implies that Oct 31 = Dec 25
ANOTHER ANGLE
If a = b then b = a
This means that Oct 31 = Dec 25 is the same as saying Dec 25 = Oct 31 and this is known as the symmetric property of multiplication.
However, for the sake of the nerdy ones in the house, let’s go ahead and prove that Dec 25 = Oct 31 by converting from decimal value to octal value.
– Converting Dec 25 to Octal Value
I’ll start by outlining the general process of converting from Base 10 to any other number base.
The Process:
1. Divide the “desired” base (in this case base 8) INTO the number you are trying to convert.
2. Write the quotient (the answer) with a remainder like you did in elementary school.
3. Repeat this division process using the whole number from the previous quotient (the number in front of the remainder).
4. Continue repeating this division until the number in front of the remainder is only zero.
5. The answer is the remainders read from the bottom up.
This division process is popularly known as long division.
Dec 25 = Oct 25
Conclusion
Programmers don’t really confuse October 31st with December 25th.
The whole Halloween – Christmas thing is just an elite programming joke about the number base systems.
With that out of the way, I’m really looking forward to this year’s Halloween, hope you are too?
Share your thoughts in the comment section below.
0 Comments