Back To Main Page
TODO: rewrite this
Binary Did you know that you can count to 31 on one hand? In fact, you can count to 1023 using both
of your hands! Or, even 4095 if you got 12 fingers lol
So, what's the secret? Well, let me introduce you to a better way to
count: binary! :3 You could be familiar with it already, but if you aren't then...
Well, what is it exactly? It's a counting system! The usual counting system that we all use is
called decimal, with ten numbers, from 0 to
9. Unlike decimal, binary only has two numbers to work with, usually
0 and 1, although there's a big problem with that approach¹.
Counting systems are based on what's called a number base, which can be as little as 2 and as much
as you could think. Decimal is base 10, while binary is base 2.
So, with that out of the way, let's try to count in binary shall we? I'm going to start from 1, same
with decimal, but the next number in binary would be 10, which is 2 in decimal. Why is that? Well,
remember how there's only 2 available numbers to use in binary? Yeah, if you add a 1 to a 1 it
increases the length of the number by 1 since there's no more room to add anything else, just like
in decimal when you try to add 1 to a 9, it increases the length of the number by 1, which would be
10 in that case.
Do numbers in binary get ridiculously long? Yep, but let's try to think. Maybe the numbers
themselves are too big for binary? After all, we only need 2 symbols to represent the number with.
One way i like to write binary in text is by using . as 0 and ! as 1 :3 From now on, i'll be using
those symbols to represent binary.
Okay, so we haven't even counted to 10 yet and there 2 other paragraphs that i wrote? That's funny
x3 Anyway, let's try to count even higher.
! = 1
!. = 2
!! = 3
!.. = 4
!.! = 5
!!. = 6
!!! = 7
!... = 8
!..! = 9
!.!. = 10
Huh.. well, what just happened? x3 Looks pretty confusing. Remember when i said that the number
length increments when we add 1 to 1? Uhh, let me rephrase that: the number only increments its
length when there's no 0's left to fill 1's with! x3 Something something idk how to end this
paragraph
Converting from hex or octal using binary
Yesterday i learned something really awesome about binary! Well, technically i already heard about
it in The Best Way to Count video i've linked above, but that went over my head pretty easily. Have
you ever seen a number like 7FA and wondered "how the freak can anybody count like that lol", well
turns out if you know binary, it's actually pretty easy! :3 The method for converting from hex to
decimal is this: first take the hex number, for example 4A, then split it digit by digit, so 4A
turns into 4 and A. Next, you want to convert all those individual hex numbers in sequence to binary
numbers. 4 would be !.. and A would be !.!., the individual binary numbers
should always be 4 digits long or else this won't work, but you can remove the zeros at the left end
if there's no numbers left: !..!.!. Now, this part is a bit harder, you need to count
this number in decimal. How? Easy, each digit, or bit, from right to left adds a number which is
always multiplied by 2 after the first bit. basically 1*2 = 2; 2*2 = 4; 4*2 = 8; 8*2 = 16 and so on.
We counted to 5 bits using this. Now, !..!.!. has 7 bits, and to make the counting
easier we just need to pick which bits are on (!), and off (.). The 2nd, 4th and 7th bits are on,
and those are 2,
8 and 64 respectively, and now we just need to add them together!
2 + 8 + 64 = 74. This is kinda convoluted so, let me write this in one line: 4A = .. !.!.= 74
Hmm, i'm still pretty bad at explaining things, not sure how to fix that