r/WatchandLearn • u/Sumit316 • Jun 15 '19
How to teach binary.
https://i.imgur.com/NQPrUsI.gifv138
u/yomamaisanicelady Jun 15 '19
Think of this as normal decimal addition, except instead of carrying 1 over every time the total exceeds 10, you carry one over every time the total exceeds 2.
38
24
u/floored1585 Jun 15 '19
Minor correction: decimal carries when it exceeds 9, binary when it exceeds 1. Or when they reach 10 or 2, to put it differently and still use the base number.
4
→ More replies (5)1
66
u/surfs_not_up Jun 15 '19
Okay call me stupid, but please explain what I just saw!
108
u/FroZnFlavr Jun 15 '19
Every place represents a digit, starting from left to right: 32, 16, 8, 4, 2, 1
Now, when there’s a 1 in its place, you count it, when there’s not, you don’t. Add up whatever numbers it’s placeholding and that’s your total. This also implies leading zeroes are irrelevant.
i.e.
One is 01, 00001, 001
two is 000010, 10, 010
three is 00011, 0011, 011
seventeen is 010001, 10001, 00010001
thirty-eight is 100110, 00100110
and obviously this placeholding goes on forever for 64, 128, 256, etc.
17
u/Kondellark Jun 15 '19
I’m still confused...
→ More replies (1)10
u/FruscianteDebutante Jun 16 '19
The difference in number systems is the maximum amount one digit value can hold.
Most people use the decimal numerical system. In this system, the max value one digit holds is 9. 0-9 then we add 1 to the next decimal.
Example: 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10.
Now in binary, the maximum value any digit can hold is 1.
Example: 000, 001, 010, 011, 100, 101, 110, 111... And so on. Therefore to represent 10 in decimal we need four digits of binary: 1010 (equal to: 8 + 0 + 2 + 0 = 10).
For bonus, there's also octal and hexadecimal. Octal means the max value per digit is 7, and hecadecimal the maximum digit value is 15.
You may be thinking "how can one digit hold 15 values?" good question.
Counting thru all of the values in hex:
00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13.... Etc.
Hope that clears something up
12
2
→ More replies (3)2
u/GrunkleThespis Jun 16 '19
Hey this is really cool!!! Could I ask why I thought thirty-eight would be 10100? Is that just another correct answer?
→ More replies (2)13
u/atheist_apostate Jun 15 '19
Binary arithmetic/logic you see here is what computers use. They don't actually use regular letters or numbers when they are doing their computations. They only use 0's and 1's. That's because computers are made of electrical circuits. Each circuit either has electricity flowing (which is a 1), or has no electricity flowing (which is a 0).
This is as much ELI5 as I can get. Of course the real computer circuitry is a bit more complicated than this mechanical contraption.
5
2
2
u/atharvat80 Jun 15 '19
Binary uses powers of 2 and numbers 0 and 1 to represent values like how we use powers of 10 and numbers 0-9 to represent values.
For example, we can express 127 as 0×103+ 1×102 + 2×101 + 7×100
Similarly in binary 127 can be expressed as 0×27 + 1×26 + 1×25 + 1×24 + 1×23 + 1×22 + 1×21 + 1×20 or simply 01111111
This is similar for any base n number system. You have a set of n different characters which express values in terms of powers of n
1
u/demalition90 Jun 16 '19
When you count normally you have 10 symbols, and when you run out of syllables you just add another digit.
Binary is just 2 symbols, so you have to add another digit a lot more often but it's easier for computers to detect "off/on" than it is to try to detect 10 levels of "kinda off a little bit on"
1
Jun 16 '19
Yeah I feel like this only made sense to me because I already know binary. Doesn't seem like a good way to teach it to a beginner--at least not without someone explaining it.
1
u/Ur_mothers_keeper Jun 16 '19
You know how when you count 1-9, when you reach 10, you just stick a one in front and start at 0?
Do that, except you don't have 1-9, you just have 1, and count normally.
1
u/manmat Jun 16 '19
Yeah, you are not stupid. This is a terrible way to teach binary. I wouldn’t even call it teaching.
→ More replies (1)1
u/PrestigiousInterest9 Jun 17 '19
Instead of writing 1234 you write it as 1's and 0's and you saw how to count to 10 in that form. Can you keep going until you write 32?
178
u/wreptyle Jun 15 '19
There are 10 types of people in the world: Those who can count in binary, and those who can't.
84
Jun 15 '19
There is a 11rd type too. Those who cringe at these god awful jokes.
21
→ More replies (1)11
13
u/LeoPlats Jun 15 '19
And those that werent expecting this joke to be in base 3!
4
3
1
13
10
Jun 15 '19
Now I truly understand why I am not a computer science major.
1
u/YassinRs Jun 16 '19
This is actually a really shitty way of learning it. In a nutshell, we are used to each column going up to 9 with numbers then adding 1 to the next when you reach 10. With binary, you go up to 1 thrn add a 1 to the next column when you reach 2. That's it.
39
u/iSmellMusic Jun 15 '19 edited Jun 15 '19
This is not a good way to learn binary... Here's a way to learn it as opposed to memorizing where they are up to 20
64 32 16 8 4 2 1 <- these numbers correspond to your 1s and 0s. 1 means that value is true and 0 means false. You always start at 1 and just keep doubling to the left
So if my number was 7, it'd be 0000111
More examples:
43: 0101011
69: 1000101
25: 0011001
8
8
5
u/smallhandsbigdick Jun 15 '19
Could you elaborate please? I’m not trying to be dense but i don’t get it.
7
u/Teewah Jun 15 '19
64 32 16 8 4 2 1
0 0 0 0 0 0 0
The 8 zeroes is called an octet. The numbers above them are what each place counts as. 1 means you count it, 0 means you don't.
1 = 00000001 (last bit on, its value is 1)
65 = 10000001 (64+1)
69 (nice) = 10000101 (64+4+1)
→ More replies (8)1
u/smurphatron Jun 15 '19
Your way teaches how to convert from binary to decimal, but it's not really a good way of giving someone an intuitive understanding of what binary is. You need to give them the understanding that it's the same as decimal, but with only 0 and 1 instead of 0-9.
1
1
u/nopantsu Jun 16 '19
Another way involves simply halving a number and writing a 1 every time there is a remainder. A hard example: 657
657/2 = 328 //1
328/2 = 164 //0
164/2 = 82 //0
82/2 = 41 //0
41/2 = 20 //1
20/2 = 10 //0
10/2 = 5 //0
5/2 = 2 //1
2/2 = 1 //0
1/2 = 0.5 //1
Then you just write the number out from bottom to top and you get
1010010001
This doesn't really help us to understand how binary works but is useful for shorthand conversion without needing to do anything but halve a number and write the remainder.
1
u/demalition90 Jun 16 '19
28 27 26 25 24 23 22 21 20
64 32 16 8 4 2 1
You can do the same with base 10, every decimal place is just 10n
1
u/ktkaffrin Jun 16 '19
Thank you! This makes the most sense of any explanation, as a person who isn’t familiar with binary
6
u/BrayKerrOneNine Jun 15 '19
Oh, ok. I don’t get it
1
u/Jouuuuuuuu Jun 16 '19
This video expects you to count to a million by hand, check out the other explanations if you’re interested
1
u/Ur_mothers_keeper Jun 16 '19
You know how when you count 1-9, when you reach 10, you just stick a one in front and start at 0?
Do that, except you don't have 1-9, you just have 1, and count normally.
5
u/UncleRudolph Jun 15 '19
I can’t pick this up Is It just me
1
u/UnexpectedLemon Jun 16 '19
Yeah it’s a bad explanation. Here’s a good way to understand it. Imagine the numbers 9,8,7 and 6 don’t exist. If you counted, it’d go 0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15, 20. When you went past 5, it’d go to the next decimal place, just like what happens normally when you add 1 to 9. Imagine like that, except 0 and 1 are the only numbers that exist.
9
Jun 15 '19
Now let’s teach everybody about how negative values work in binary so it’s confusing again.
1
u/bumblebritches57 Jun 15 '19
2's complement really isn't hard either.
You just invert the system so that 0 = set, and 1 = unset.
Sounds like a technicality, but in C++2a and C2x 2's complement will be the only supported type of negative number representation in C and C++.
3
4
4
u/BrayKerrOneNine Jun 15 '19
I don’t get it
1
u/SeiTaSwagger Jun 15 '19
Essentially it’s like normal counting, except instead of restarting after 9, you’re restarting after 1 (because in binary nothing but 0 and 1 are used)
10
3
Jun 15 '19
What is binary
4
u/rhymes_with_chicken Jun 15 '19
Base 2 numbering system. The only digits are 0 and 1. If you’re wondering why it may be important, it’s because a transistor only has two states off (0) and on (1). Computers are just an array of millions of transistors each flipped one way or the other to create their logic. For example, when you address a memory location in a computer’s memory, it is a binary address. So, if you wanted to store a piece of data in the 17th position of the memory, it would be stored at 10001. Looking at the model in the video, that is the 17th flip of the numbers. There’s a much simpler way to mentally calculate it. The video just shows literally what is happening when you count in binary.
3
u/beric_64 Jun 15 '19
They do have computers that use base ten interestingly, but they are much less efficent
→ More replies (1)
3
3
3
u/Maximum_Overhype Jun 15 '19
How high up does it go?
1
u/TranquilTempest Jun 15 '19
6 bits can go 0 to 63, but you can go as high as you want if you add more bits.
3
3
u/elasticVirtue Jun 16 '19
I’ve always loved this essay about a math teacher who taught binary to class of third graders using the “Socratic method”: http://www.mathmaniacs.org/lessons/01-binary/socratic.html
2
u/mnemamorigon Jun 15 '19
It never occurred to me that 1111 must be 15 until I watched this. So 11111 has to be 31.
2
2
2
2
2
u/Gatekeeper-Andy Aug 27 '19
THANK YOU!!!! IVe never understood binary, this made it way more clear tha n any 30 minute rant my dad can go on!!
2
3
u/OrangeClyde Jun 15 '19
I learned nothing.
1
u/ThadrikaTonkas Jun 15 '19
Hi, lots of people explaining it on this thread but I’ll give it a go. So obviously it’s a ‘base 2’ system - now this means that instead of having 10 digits (base 10) like our normal system - just 0’s and 1’s. So when it comes to representing numbers; let’s work with 8 ‘slots’ which is what you’ll see most commonly.
A 1 represents a full slot, a 0 an empty one. So you work backwards when representing.
128 64 32 16 8 4 2 1 - as you go from right to left the number the slot represents doubles.
It’s probably much easier if we look at an example or two, imagine it as multiplication.
00000101 = (0128) + (064) + (032) + (016) + (08) + (14) + (02) + (11) = 4 + 1 Clearly this is very longwinded, but hopefully you can see the process.
01101111 = (0128) + (164) + (132) + (016) + (18) + (14) + (12) + (11) = 64 + 32 + 8 + 4 + 2 + 1 = 111
I do hope this helped!
1
u/Ur_mothers_keeper Jun 16 '19
You know how when you count 1-9, when you reach 10, you just stick a one in front and start at 0?
Do that, except you don't have 1-9, you just have 1, and count normally.
1
u/Pedrinho21 Jun 15 '19
You can also see the difference between 8bit and 16bit based on the amount of digits in the code
1
1
u/LordPyhton Jun 15 '19
So anyone know how far you can go on this set up? What's the largest number on this?
1
u/leadchipmunk Jun 15 '19 edited Jun 15 '19
63 - There are 6 bits (the binary equivalent of a digit) and each subsequent one to the left is double the one on the right. It reads out as:
32 16 8 4 2 1
If the bit is a 1, you add that number to the other 1s. So 1 1 1 1 1 1 is 32+16+8+4+2+1=63
If you were to add another 1 to it, the rest would flip to 0 and a 7th bit would change to one. That bit is worth 64 (which is 32 times 2). So to cheat, you can just take that invisible 7th bit and subtract one to get 64 or 111111 in binary.
1
u/bumblebritches57 Jun 15 '19
Literally as many as you want.
Computers commonly support 64 bit registers (having a string of 64 1s and 0s)
But you can make a bit string as long as you like, that's how FSE and arithmetic coding (compression algorithms) work, a single megabyte long string of bits.
1
1
1
1
u/VinBarrKRO Jun 15 '19
So then what is Clutch saying with “10001110101”?
1
u/professor_farnsw0rth Jun 16 '19
Basically nothing to a computer. It's not in a bit format. As a number in binary, it is (1024 + 64 + 32 +16 + 4 + 1) = 1141
2
u/VinBarrKRO Jun 16 '19
Boom, thank you very much for your time and happy cake day!
→ More replies (1)
1
u/fakieflip180 Jun 15 '19
Ok, do you have one on how to go from hexadecimal to binary that is that easy? I been looking for that one. Hell I'LL even settle for hexadecimal to octal.
0
1
u/LastStar007 Jun 15 '19
For two hundred bones I'll build you one that counts in ternary. Or quaternary.
1
Jun 15 '19
Ok but wth does flip the bits and add 1 mean
1
u/__jamien Jun 16 '19 edited Jun 16 '19
Flipping all of the bits and adding 1 is how you get the negative of a number. It's called the 2's complement. With this system, you dedicate the top half of our value range to negatives though.
e.g.
01001 = 9; turn 0's to 1 and 1's to 0:10110 = -10; add 1:
10111 = -9
The adding 1 is so that you don't end up with negative zero and positive zero.
000 = 0
111 = -1
1000 = 0 (the extra bit get lopped off by the processor)
→ More replies (1)
1
1
1
u/deputybadass Jun 15 '19
If you turned the flat tile into a triangle or a square for each one, would this translate to ternary or quaternary systems as well?
1
u/seegee1 Jun 15 '19
There are 10 types of people in this world. Those that understand binary, and those that don't.
1
1
u/itskelvinn Jun 15 '19
This isn’t really “teaching” binary or “learning binary”. It’s literally counting one by one in binary. Not really effective, especially when you need the number shown in the video
An easier way to understand it is to convert a number, say 12 to binary and from binary like 100101 to a base 10 number. It takes like 5 minutes and is so easy to understand well
1
1
u/Pinkestunicorns Jun 15 '19
It doesn't seem to follow common logic.. I think I've figured it out and then it does a totally unexpected next move
1
u/merlinfs Jun 15 '19
What's unexpected or illogical? It's just the same principle used over and over again.
1
Jun 15 '19
Is it bad that i just write
128 64 32 16 8 4 2 1 etc
on a piece of paper and just add the numbers i need?
1
u/yayroos Jun 16 '19
Computer science major here, I'm pretty sure that's what we all do, and I'm pretty sure most of my lecturers do that too if they ever need to work out binary by hand
1
Jun 15 '19
Read from right to left
From right to left they read, 1,2,4,8,16,32..
If there is a one in the column, add the corresponding number to the total.
1010= 8+2= 10
1110 =2+4+8= 14
Incase anyone was wondering
1
1
1
u/theoriginalmathteeth Jun 15 '19 edited Jun 16 '19
Or you can learn it regularly, because that’s less difficult than your stupid game.
The first number (in computer science) represents +/-
Forget the sign for this demo
The second number represents 20 so 1 or 0 if 1 then put 1
The next number represents 21 so 2 or 0 if 2 then put 1
The next number represents 22 so 4 or 0 if 4 then put 1
The next number represents 23 so 8 or 0 if 8 then put 1
So on and so forth
If I represented 26 it’d be 11010 24+ 23+0+21+0 = 26 = 11010
1
1
1
u/wolfsection31 Jun 16 '19
God damn. My teacher couldn‘t teach this but a simple video can? Don‘t know if that‘s depressing or awesome.
1
u/eipeidwep2buS Jun 16 '19
My maths extended teacher taught me how to do that with my fingers. I can now count to 1023 on my hands.
1
u/TheQueefGoblin Jun 16 '19
This is a fucking stupid way to "teach" people the binary number system.
A far, far easier way is to explain how each binary digit (called a "bit") can be either 0 or 1, and how if you think of the numbers like columns in a spreadsheet, each binary digit corresponds to a normal (base 10) number:
Corresponding decimal value: 64 32 16 8 4 2 1 0
"9" written in binary: 0 0 0 1 0 0 1 0
"23" written in binary: 0 0 1 0 1 1 1 0
"2" written in binary: 0 0 0 0 0 1 0 01
1
Jun 16 '19
Okay this finally did it for me. Legitimately learned something in this subreddit for the first time
1
u/flugundraumfahrt Jun 16 '19
Someone should add another layer and do hex.
1
u/2ByteTheDecker Jun 16 '19
Bruh enough people in here with their heads exploding at base2 don't bring base16 into this ..
1
u/Shinokiba- Jun 16 '19
Okay, gonna give everyone a quick lecture on how to count binary. Typically each binary has 8 digits, but you add more if needed. Also, remember a quick pattern about numbers doubling.
1, 2, 4, 8, 16, 32, 64, 128
Each of these 8 digits represents a "1". Using 8 digits we can count up to 255.
00000001 = 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 = 1
00000010 = 0 + 0 + 0 + 0 + 0 + 0 + 2 + 0 = 2
00000100 = 0 + 0 + 0 + 0 + 0 + 4 + 0 + 0 = 4
01000000 = 0 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 64
00000011 = 0 + 0 + 0 + 0 + 0 + 0 + 2 + 1 = 3
00000111 = 0 + 0 + 0 + 0 + 0 + 4 + 2 + 1 = 7
00000101 = 0 + 0 + 0 + 0 + 0 + 4 + 0 + 1 = 5
10000001 = 128 + 0 + 0 + 0 + 0 + 0 + 0 + 1 = 129
10011001 = 128 + 0 + 0 + 16 + 8 + 0 + 0 + 1 = 153
1
u/Sonmaru Jun 16 '19
I remember binary...now reteach me the value of the color bands on the resistors
1
1
u/chilltorrent Jun 16 '19
Ok I see the correlation here between binary and numbers but what does it actually mean
1
u/yayroos Jun 16 '19
binary is numbers, just a different way of writing them. We use binary because it's easier for a computer to do logic and math on binary than on any other counting base, because with binary you can just use on and off electrical signals, and the physical properties of things like silicon to do maths, instead of having to use some other representation of different values of digits
1
1
1
1
1
u/rubbarz Jun 16 '19
I think the 32,16,8,4,2,1 visual would work better so you understand how it gets those numbers with the corresponding place of 1. You're not trying to teach a 5 year old binary here.
1
u/SirPikaPika Jun 16 '19
How do you get letters out of binary though?
1
u/Peffern2 Jun 16 '19
There's just an arbitrary encoding that some people came up with: A is 65 (1000001), B is 66 (1000010), etc. It's nit related to the nath in anyway, just a table. Google "ASCII table" if you want to see the whole list.
1
u/RelevanttUsername Jun 16 '19
I have the learning type where the best way to describe how I understand math is by turning whatever the problem is into words - I’ve been watching this GIF for a solid five minutes and I still don’t get it. Appreciation for those who get this and deal with it on the daily, I just - can’t?
1
u/RestEqualsRust Aug 28 '19
The far right column shows either a 1 or a 0. If it’s 1, it’s 1, if it’s 0, it’s 0. That’s the easy part.
The second column from the right is multiples of two. A 1 represents a single 2. The third column from the right is multiples of 4. If that column shows a 1, it really represents a single 4.
The next column is 8, the next is 16. And so on.
So 11111 is 16+8+4+2+1 or a total of 31.
11011 is 16+8+0+2+1 or a total of 27.
10000 is 16+0+0+0+0, or 16.
EDIT: I just realized this post is 72 days old. Or 64+0+0+8+0+0+0, which is 1001000.
1
1
u/Zeaeael Jun 16 '19
ITT: 10 types of people: people who know binary and think this is a great way to learn and people who don't know binary and are still equally confused.
I'm starting to think this might not be how to teach binary...
1
Jun 16 '19
Oh ok. So it's like counting to 1000 but the only numbers you have are 1 and 0
Now wait, how do you translate letters
1
u/supra728 Jun 16 '19
Letters and symbols are just assigned a number (and prefaced by something that says "this is a letter")
1
u/TSWYJQ Jun 16 '19
Um, so how does decimal work in binary?
1
u/supra728 Jun 16 '19
For a decimal number you just start the chain earlier. So say 1 was the 5th digit, then going right it would be 1/2, 1/4, 1/8, 1/16 etc
1
u/rawriclark Jun 16 '19
its funny because everyone in the comments are trying to represent binary in base 10, just leave it at binary :) if i had an apple and you give me another apple then id have 10 apples dont convert it to base 10 just leave it alone!!!, damn base 10 native humans
1
1
u/Tessa19950 Jun 16 '19
Sometimes you see computers be 32 or 64 bit, is that because of this? Like the 64 one has one more digit?
1
1
1
1
1
1
1
1
1
1
1
1
1
u/9yo_HolyKnight Aug 28 '19
I still dont understand why I'm being taught to convert between decimal binary overall and hexadecimal.
1
1
1
u/sqgl Aug 30 '19
Why does the lever on each bit always fall left and never right?
1
u/Eaqeaq Sep 02 '19
The "nail" holding it in place is offset so the center of gravity is to the left of it.
→ More replies (1)
1
u/Not_MrNice Jun 15 '19
How in the world is this showing how to teach binary?
2
1
u/beric_64 Jun 15 '19
Think of it this way, it's just like normal counting, except, you carry the one when you get to one instead of nine.
1
1.3k
u/Tolwenye Jun 15 '19
It's a repost, but damn. I tell people you can learn binary in under 5 minutes and no one believes me.
Here's your upvote.