Why does the computer scientist confuse halloween and christmas? Because 25_dec = 31_oct



A computer stores everything with 1s and 0s. To encode any number as a string of 1s and 0s you use the binary system. It is similar to the decimal system normal humans use, but it has only two digits 1 and 0. In the decimal system, you have the base 10 and can rewrite the number 25_dec as 2 10^1+5 10^0. In the octal system the number 31_oct can be representet as 3 8^1+1 8^0=25_dec. there are also other systems like hexadecimal with the 16 digits 0,1,2,3,4,5,6,7,8,9,A,B,C,E,F and the sexagesimal system with 60 different digits. To get from one system to the other, you divide by the base with remainder until you reach 0. Then, you string the remainders of these calculations together starting with the one computed last.