This is topic Cousin Hobbes’s Explanation of Binary in forum Books, Films, Food and Culture at Hatrack River Forum.


To visit this topic, use this URL:
http://www.hatrack.com/ubb/main/ultimatebb.php?ubb=get_topic;f=2;t=019769

Posted by Hobbes (Member # 433) on :
 
I’m doing this because at one point I plan on doing a Cousin Hobbes explains how computers work series, and you have to at least be familiar with these concepts to understand how computers work. So when ever I do write that topic, I can just link back here to explain it. [Smile]

We all know (or hopefully know [Wink] ) base 10 numbers. 0-9 makes up all of the digits we have, when we want to write bigger numbers than 9, we just put a 1 in the “tens” column and start over with 0 in the “ones column”. And of course once we reach 19 and want to go up, we put a 2 in the tens column and start over at 0. I think we also all understand this concept, certainly we all use it. But sometimes it’s difficult to understand the meaning of the tens column when it is no longer the tens column (as in binary).

So let’s look at what the “tens column” really means. It’s pretty simple, it means you multiply whatever digit is in that column by ten to get the number it represents. 10*1 = 10. 10*2 = 20. So whatever number is in that column really just means multiply it by ten. The “ones column” means multiply by one. Hundreds column multiply by 100 and so on. Pretty simple, right?

But this is just for base 10, if we want to work in, say, base 5 then you don’t have a tens column. So we have to figure out why there’s a tens column and hundreds column and so forth in base 10. Which is, again, pretty simple; we can rename the columns so that they are the same for any base. Let’s just call them column zero, column one, column two, column 3, and so forth all the way out to infinity. So then 548 has an 8 in column zero, a 4 in column one, and a 5 in column 2. To figure our what this number is in base 10 we multiply 5 by 100, 4 by 10, and 8 by 1. But if we don’t know what base it is in, we can just check column numbers.

Let’s say it’s in base b; then to find out what 548 represents we multiply 5 by b to the 2nd (because it’s in column 2), 4 by b to the 1st (column 1) and 8 by b to the 0th (column 0). This simple formula will tell you what any number is in given base b.

As an example, we can figure out 3412 in base 5. 3*5^3 + 4*5^2 + 1*5^1 + 2*5^0. 5^3 is 125, 5^2 is 25, 5^1 is 5, and any number ^0 is 1 so it’s 3*125 + 4*25 + 1*5 + 2*1. Which (only one more step left) is 375 + 100 + 5 + 2(all now in base 10). So 3412 (in base 5) is 482 in base 10.

This is how bases work in general, so figuring out binary (base 2) should be pretty simple. To do so, lets look at converting a base 10 number into binary. Say, 189 into binary. Well, what are the various columns of binary? 2^0 is 1, 2^1 is 2, 2^2 4, and so on. 2^7 is 128, 2^8 256, which is larger than our number so let’s stop there.

Binary makes for simpler conversions because either you put a ‘1’ in a specific column or a zero, no need to figure out how many 128s you need to obtain this number, all you need to know is that you have to have one. So lets put a 128 in our number. 1000000 has a ‘1’ in the 128th column and ‘0’s in the rest, so of course it represents the base 10 number 128. This is the first step in converting 189, we have 128 already so let’s subtract that from 189 to get 61.

Now we go to the next largest column after 128. 2^6 is 64, so let’s see if we need a ‘1’ there. What we have left from 189 is just 61 since we’ve already taken care of 128. 61 is smaller than 64, so we’ll leave the zero in that column and we still have 10000000. Now go down to the next column, 2^5 which is 32. 61 is larger than 32 so put a ‘1’ in that column and subtract 32 from 61 since it has been taken care of. So now we have our number as being 10100000 with 29 left to take care of.

Next column is 2^4 or 16. Once again, 29 is larger than 16, so a ‘1’ in that column. 10110000 with 13 left to deal with. Next column 2^3 or 8. 13 is larger than 8 so 10111000 with 5 to deal with. 2^2 is 4, which 5 is larger than so we now have 10111100 and 1 to deal with. 2^1 is 2, which 1 is smaller than so we’ll put a ‘0’ in that column. Finally we have 10111100 with 1 to deal with. 2^0 is 1, which is what we have left, so we’ll put a 1 in the 1s column and we have 10111101 and none of the number left, meaning that we have reached our final answer.

This is binary, just another way of counting, one that only uses two digits to do so (or 10 digits in binary [Wink] ). Hopefully now you understand it and how bases in general work (the alphabet for instance, is just base 26 with different representations for the digits). If not we’ll just chalk it up to be further proof of my inability to communicate. [Smile]

[EDIT: just so you know, before I do launch into computers I'm going to explain boolean algebra too, since that's even more basic for computers but it seemed like too much for one post]

Hobbes [Smile]

[ November 20, 2003, 01:59 PM: Message edited by: Hobbes ]
 
Posted by slacker (Member # 2559) on :
 
Times like that make me glad that I was just given a sheet that you could plug the numbers into to teach you how to read/write in binary.

I almost fell asleep from your explanation. [Razz]
 
Posted by Hobbes (Member # 433) on :
 
Sorry. [Embarrassed] Perhpas more people would like me if I just wrote a little console application to do it for them instead of trying to explain it. [Wink]

Hobbes [Smile]
 
Posted by Farmgirl (Member # 5567) on :
 
I liked your explanation. I just wish you had put a little more white space (paragraph breaks) in that next to the last big section -- it got kind of hard to track line to line...... made it hard to follow

Farmgirl
(I know, I know -- old geezer with glasses)
 
Posted by beatnix19 (Member # 5836) on :
 
um... the big button turns the computer on. [Confused]
 
Posted by Hobbes (Member # 433) on :
 
Sorry Farmgirl, I typed it in Word and forgot to double space those last few paragraphs.

Beatnix, that's right, it then has value '1'. [Razz] [Wink]

Hobbes [Smile]
 
Posted by Annie (Member # 295) on :
 
You know, there are 10 kinds of people...
 
Posted by beatnix19 (Member # 5836) on :
 
Hobbes - I'm glad people like you exsist so people like me have someone to call for help.

If the cousin Hobbes computer series continues in this manner I'll be sure to stay away and avoid the headaches that will most definately follow any attempt I make at understanding. [Smile]
 
Posted by T_Smith (Member # 3734) on :
 
You complicate things.

189, eh?

189/2 = 94 R 1
94/2 = 47 R 0
47/2 = 23 R 1
23/2 = 11 R 1
11/2 = 5 R 1
5/2 = 2 R 1
2/2 = 1 R 0
1

10111101

Gee hobbes, way to complicate things.
 
Posted by Rappin' Ronnie Reagan (Member # 5626) on :
 
::sigh:: i miss math. i can't wait to take computer science I next semester! yay!
 
Posted by T_Smith (Member # 3734) on :
 
Whats really fun is hexidecimal. ::quivers with delight:: Letter and numbers.... gotta love it.
 
Posted by beatnix19 (Member # 5836) on :
 
oh, no... eyes burning... ears smoking... the pain, oh the pain.

<-- *runs screaming from thread before head explodes*
 
Posted by Julie (Member # 5580) on :
 
I always wondered about binary. Now I don't necessarily understand it but at least I know what it means!
 
Posted by Julie (Member # 5580) on :
 
quote:
189/2 = 94 R 1
94/2 = 47 R 0
47/2 = 23 R 1
23/2 = 11 R 1
11/2 = 5 R 1
5/2 = 2 R 1
2/2 = 1 R 0
1

10111101

When you do it this way are you still using the exponents as a guide? [Confused]
 
Posted by fugu13 (Member # 2859) on :
 
He's taking advantage of a property of modulo addition.
 
Posted by Eruve Nandiriel (Member # 5677) on :
 
I just finished my math for the year, and I'm not about to try and understand this.
*mutters* hyperbolas, parabolas, quadratic formula...uhg...
 
Posted by skrika03 (Member # 5930) on :
 
(possessed by the hovering wraith of pooka)

I think what you are getting is that your explanation starts at too high of a level. I understood it, but I already understand binary. Hmmm, specifics:

"We all know base 10 numbers" A lot of folks don't realize "normal" numbers are base ten. If they don't, you've lost them right here because they now are thinking "I don't know what this guy is talking about, I'm going to give up now." A better way to put it might be "Binary, or base 2 numbering, is how people communicate with computers. We have ten fingers. Computers only have 2. So it was necessary to find a way to describe all numbers based on 10 digits (most people will not ever see this as a pun) into 2."

"Because we have 10 digits (0-9) our method of counting is called base 10."

I know this is a lot longer, but hopefully it will pay off in allowing you to delete other stuff later.

Of course, as I'm writing this I realize computers only have one finger, and it's either down or up. Which brings to mind the question why we don't communicate with our fingers in ASCII instead of using words. That way we could have invented civilization instead of the greeks or chinese, because their character sets aren't viewable in ASCII. Stupid temporal causality parameters. [Smile]
 
Posted by Annie (Member # 295) on :
 
computers have 2 fingers? cool!
 
Posted by Julie (Member # 5580) on :
 
I didn't know my computer had any fingers at all. [Smile]
 
Posted by Morbo (Member # 5309) on :
 
Pretty good, Hobbes. You covered it well. Base numbering systems are dull, my explanation would have been eye-glazing.

You could throw in the importance of zero as a place holder, how a lack of zero held back Greek and Roman math, and how the Muslims transmitted the zero concept from India to Europe. That would expand the subject from binary, but sometimes historical tidbits help hold the reader's attention.[edit: or other math history trivia dealing more directly with binary (uhh, can't think of any, but there must be some. . . ) I know your goal was a short, simple explanation, but to make it readable math history or anecdotes help]

*Waits breathlessly for Cousin Fugu’s Explanation of Modulo Arithmetic*

[ November 20, 2003, 04:40 PM: Message edited by: Morbo ]
 
Posted by Dragon (Member # 3670) on :
 
Okay, I'm trying to get this. Hobbes: your explanation of bases was good until you went into the actual binary part, then you lost me a bit. [Razz]

So Nathan, in:

189/2 = 94 R 1
94/2 = 47 R 0
47/2 = 23 R 1
23/2 = 11 R 1
11/2 = 5 R 1
5/2 = 2 R 1
2/2 = 1 R 0
1

What do the Rs stand for? And how do you know whether a number is a 1 or a 0? And what about decimals? Do you jsut round them? Because 11/2 isn't really 5...

[Confused] [Cry]

[ November 20, 2003, 05:01 PM: Message edited by: Dragon ]
 
Posted by Hobbes (Member # 433) on :
 
I'm afraid I don't really know my math history as well as I should. [Embarrassed] You'd have to do that part for me.

Skrika, you're right, I probably should've done that, I'm afraid I'm not much of a writer, which is partly why I write these. Thanks for the suggestion. [Smile]

T, as Fugu pointed out your way, while being perfectly valid, has more to do with the modulous function than actual base conversions. It's probably faster but way explains better what the heck is going on. Or at least comes closer. [Wink] [Smile]

For those of you bored by this, boolean's cooler, I promise! [Big Grin]

Hobbes [Smile]
 
Posted by rivka (Member # 4859) on :
 

Hooray for new math,
New-hoo-hoo-math,
It won't do you a bit of good to review math.
It's so simple,
So very simple,
That only a child can do it!


quote:
Now that actually is not the answer that I had in mind, because the book that I got this problem out of wants you to do it in base eight. But don't panic. Base eight is just like base ten really - if you're missing two fingers. Shall we have a go at it? Hang on.

You can't take three from two,
Two is less than three,
So you look at the four in the eights place.
Now that's really four eights,
So you make it three eights,
Regroup, and you change an eight to eight ones,
And you add them to the two,
and you get one-two base eight,
Which is ten base ten,
And you take away three, that's seven.

Now instead of four in the eights place
You've got three,
'Cause you added one,
That is to say, eight, to the two,
But you can't take seven from three,
So you look at the sixty-fours.

"Sixty-four? How did sixty-four get into it?" I hear you cry.
Well, sixty-four is eight squared, don't you see?
(Well, you ask a silly question, and you get a silly answer.)

From the three you then use one
To make eight ones,
And you add those ones to the three,
And you get one-three base eight,
Or, in other words,
In base ten you have eleven,
And you take away seven,
And seven from eleven is four.
Now go back to the sixty-fours,
And you're left with two,
And you take away one from two,
And that leaves...?

Gotta love Tom Lehrer!
 
Posted by Hobbes (Member # 433) on :
 
Dragon, do you have any specific questions? I'd be happy to answer them. [Smile]

The 'R's stand for remainder.

189/2 = 94 R 1

Means 189 divided by the current base (base 2 for binare) equals 94 with a remainder of 1. The remainder goes into the binary number and then the process is repeated until the division is 0. Like Fugu said, it's about the mod function, not bases.

Hobbes [Smile]
 
Posted by fugu13 (Member # 2859) on :
 
I think you'll have to wait on cousin fugu's explanation of modulo arithmetic. Cousin fugu isn't thinking about math right now [Smile] .
 
Posted by Hazen (Member # 161) on :
 
That was very informative, Hobbes. (Did you get the "Cousin Hobbes" from "Uncle Orson," or are you from Tennessee?)

I have one question about the alternate method of switching between bases: How do you know how many places it will take up? In some cases, you will need a 0 at the end, and you will need to know the number of digits in order to know if it should be there. How can you tell how many digits it will be?
 
Posted by Dragon (Member # 3670) on :
 
[Big Grin] We listened to Who's Next and Wernher von Braun in social studies the other day...

Hobbes: That helps a lot! I get it now!

*Happy dance* [Party]
 
Posted by imogen (Member # 5485) on :
 
I understand binary and bases. (You'd hope so, I did a physics/maths degree).

What I don't understand is:

Actually, I'll give you the background.
I saw a newspaper article about crop circles. (yes, i know... just bear with me) These people wrote, in binary, on a huge piece of plastic "What do you want with us"

The next morning, crop circles in the shapes of swallows had appeared in the next field.

My question is not concerning the swallow-crop-circles, but rather how does one "write" in binary? Would it just be numbers corresponding to each letter's position in the alphabet?

Or is there an accepted binary - alphabet translation that I don't know about?
 
Posted by Rappin' Ronnie Reagan (Member # 5626) on :
 
quote:
Did you get the "Cousin Hobbes" from "Uncle Orson," or are you from Tennessee?

now what does that mean? ::is from tennessee::
 
Posted by Dragon (Member # 3670) on :
 
quote:
Or is there an accepted binary - alphabet translation that I don't know about?
I don't know how it works but this does the trick.
 
Posted by Morbo (Member # 5309) on :
 
quote:
Or is there an accepted binary - alphabet translation that I don't know about?
imogen.
ASCII is a default binary-English alphabet mapping that almost all computers and programs have, no idea if that's what the crop circle folks used. I think it evolved from early teletype code and wound up with a 128 charactor set--or ist 256? Ask any hacker.

Assuming aliens did draw giant swallows, what the hell do they mean by that?
 
Posted by imogen (Member # 5485) on :
 
quote:
Assuming aliens did draw giant swallows, what the hell do they mean by that?
Guess you'd have to ask the aliens
[Smile]

I have no idea. Though I was thinking more along the lines of 'assuming people drew giant swallows as a hoax, why swallows? And how they get them so big? And neat?'
 
Posted by imogen (Member # 5485) on :
 
Actually, I'm not sure what is more weird:

The idea aliens communicate by drawing giant swallows..
or
the idea a lot of people can think of nothing better to do with their time then spend all night in a freezing cold field pretending to be aliens drawing giant swallows.
 
Posted by Morbo (Member # 5309) on :
 
Hobbes, I don't know math history half as well as I'd like either. I picked up most from only a handful of books. I was always more interested in theory and application of math than its history.

One more tidbit: sexagesimal or base-60 notation was used by Mesopotamian civilizations, I think because 60 is "divisor rich", ie has many divisors that leave no remainder, in contrast with primes which always have only 2 divisors, the prime and 1. And for mystical/religious reasons.

This is why we are saddled with 60 seconds in an minutes, 60 minutes in an hour, and 360 degrees in a circle, 4000+ years after the Babylonians used sexagesmal bases. I also just read that Mesopotamians had a place holder that resembled zero functionally (invented around the time of Alexander the Great), giving them the most accurate fractional notation of any civilization before the European Renaissance. I would hate to work with sexagesimal fractions, though. [Angst]
Source: A History of Mathematics by Carl Boyer, revised by Uta Merzbach, a very good and comprehensive book. [edit: except he left out those pesky Mayans! Probably because they had little direct effect on European mathematical development, though the Mayans had very advanced math for any ancient civilisation.]

[ November 21, 2003, 12:46 AM: Message edited by: Morbo ]
 
Posted by Annie (Member # 295) on :
 
The biggest question in the crop circle affair is -

Were they African swallows?
 
Posted by Annie (Member # 295) on :
 
didn't the Maya use base 60 too?
 
Posted by imogen (Member # 5485) on :
 
swallows .... about 3/4 of the way down the page.
 
Posted by Morbo (Member # 5309) on :
 
[Laugh] African swallows, good one Annie.
Beats me, Boyer blows off the Mayans.

According to Ask Dr. Math, "Would Aliens Use Base 10?" link, Mayans used base 20.

I do know that Mayans used a more accurate solar calendar than the Gregorian calender in common usage today.
 
Posted by Nick (Member # 4311) on :
 
<===Highest math level: Algebra II

You lost with the exponents bits. I just gave up. It would take a while to figure it all out. [Smile]

I know how to do binary though.
Say x is base 2, and y is base 10 with x on the left and y on the right:

0=1
1=2
10=3
11=4
100=5
101=6
111=7
1000=8

Right?
[Confused]

I'm probably hoplessly wrong. I only took basic binary my freshman year in high school. That was about 4 years ago.

*thinks about enrolling in a computer science course next semester*
[Smile]
 
Posted by Nick (Member # 4311) on :
 
quote:
According to Ask Dr. Math, "Would Aliens Use Base 10?" link, Mayans used base 20.

I do know that Mayans used a more accurate solar calendar than the Gregorian calender in common usage today.

That's a similar situation as to why we use a base 6 system for time-telling. The sumerians had a somewhat advanced base 6 mathematical system, and that system still influences the way we tell time today. [Smile]
 
Posted by rivka (Member # 4859) on :
 
quote:
0=1
1=2
10=3
11=4
100=5
101=6
111=7
1000=8

Right?

Close.

1=1
10=2
11=3
100=4
101=5
110=6
111=7
1000=8
 
Posted by Nick (Member # 4311) on :
 
[Wall Bash]

It's been a while. [Dont Know]
 
Posted by rivka (Member # 4859) on :
 
Yeah, and you were on the right track. [Smile]
 
Posted by Hobbes (Member # 433) on :
 
quote:
(Did you get the "Cousin Hobbes" from "Uncle Orson," or are you from Tennessee?)
First one. [Smile]

quote:
I have one question about the alternate method of switching between bases: How do you know how many places it will take up? In some cases, you will need a 0 at the end, and you will need to know the number of digits in order to know if it should be there. How can you tell how many digits it will be?
You techincally don't, if you want to look at it in a systematic way, just start with the '1's place and keep working up until you find a column that is larger than the number (i.e. with 189 get to 2^8 which is 256, larger than 189 and thus you know you don't have to deal with that column. [Smile] ).

quote:
Or is there an accepted binary - alphabet translation that I don't know about?
As Morbo said, ASCII. Things to know about ASCII: the first 128 charecters are well defined (first seven columns). The next 128 vary over systems, even though all ASCII charecters are coded in 8 digit long sequences. ASCII is specifically english charecters. UNICODE is the answer to that (stored in 16 digit numbers), though its first 128 numbers are exactly the same as ASCII, its following ones contain other charecter codes (i.e. Chinese). Also, the first few charecters are not alphabet charecters, they are command charecters. Things like tabs and new lines and carriage returns (and the null terminator but you have to know more about programming to get that one).

Hobbes [Smile]
 
Posted by imogen (Member # 5485) on :
 
So basically these people were presuming that aliens know binary (ok...) and ASCII.

Alien hunters! [Roll Eyes]
 
Posted by T_Smith (Member # 3734) on :
 
code:
 1001
+0011
_____
1100

Also something to point out, when adding in binary, it works the same way, except whenever you get a '2', the answer to 0 and carry the one to the next columb.

A little skip into boolean algebra (all of this is in Binary):

And:
A && B = A*B

If A = 1 and B = 1 then you get an output of 1

Or:
A || B

Simple enough: if A OR B equals 1, the output is 1

So you get something like this (numbers under coorespond with what they equal):

Boolean And:

A B Output
1 1 1
0 1 0
1 0 0
0 0 0

Boolean Or:

A B Output
1 1 1
1 0 1
0 1 1
0 0 0

Then you get into the "opposite ofs" otherwise known as the nots. ! = 'not'. If outside the parentheses, the value of the equation is flipped. If inside the parentheses, just the variable (A or B) is flipped.

Not Ands
!(A&&B) = the opposite of A*B

Not Ors
!(A||B) = the opposite of A or B

!And:
A B Output
1 1 0
0 1 1
1 0 1
0 0 1

!Or:
A B Output
1 1 0
1 0 0
0 1 0
0 0 1

Or if you want just the opposite of one variable

!A

A Output
1 0
0 1

With this, we have a little bit of fun now. This is boolean algebra to prove that:

1+1 = 10 (2)

(A&&!B) = C

(!B&&B) = D

(A&&B) = E

(C||D) = F

Output = E F

Pretend A = 1 and B = 1 (again, think in terms of binary)

1. C = 0

2. D = 0

3. E = 1

4. F = 0

Output = 10 (or 2 in binary)

E is going to represent what you are carrying over to the next columb, while F represents what stays in the original columb you started with.

Its late. Hobbes with explain it better.
 
Posted by luthe (Member # 1601) on :
 
In the begining ASCII represented characters with 7bits (a binary string 7 places long) which is large enough for 128 different characters (2^7 = 128). In this set the first 32 characters were control characters (nonprinting) for things like line feed, carrige return, and escape.

Later on someone decided that they needed accented characters and switched to using 8bits per character this gave 256 differnt characters the upper 128 were for a time defined by the operating system that you had. Eventually it was all standardized into the ANSI codes page which was identical to the ASCII code for the first 128 and depended on you country for the second, this allowed people to have the special characters that some languages use. This solved many of the problems, although not all of them. you could still only display 256 different characters at a time, and documents transfered between computers in different countries might not display the same text on both computers.

Unicode eventually came along to fix most of these problems. Unicode does not specify a number of bits for each character, Allowing the implemantation to specify how many they are using, althought the common ones are 8,16,32 bits per character. With all of them able to display any of the 95,221 differnt characters currently defined by the spec. Windows 2000 or better uses 16bit unicode characters by default. see http://unicode.org/ for more info.

This is alot of stuff I left out (IOS standarizations, byte order marks, etc.) and I may have gotten something incorrect so please feel free to correct me if so.

[ November 21, 2003, 08:49 AM: Message edited by: luthe ]
 
Posted by saxon75 (Member # 4589) on :
 
T,

That was a good explanation. Just a few nitpicks:

The standard Boolean Algebraic notation for the AND operation is * or ·. i.e. A AND B is written as either A*B, A·B, or just AB. Using the double ampersand (&&) notation is confusing, because in C/C++, && is not strictly the Boolean AND operation.

The standard Boolean Algebraic notation for the OR operation is +. i.e. A OR B is written as A+B. Similar nitpick about the double pipe (||) notation.

The reasons for using the familiar multiplication and addition signs for AND and OR in Boolean Algebra becomes clear when you examine the algebraic properties of those operations.

The standard notation for inversion (NOT operation) is to put a line over the variable or expression being inverted. i.e. NOT A is written as Ā. But this one is harder to type, so it's also common to use !A or ~A.

Truth tables are generally written with the operands in ascending binary order. i.e.:
A B = C
0 0 = 0
0 1 = 1
1 0 = 1
1 1 = 0

(Incidentally, that's the exclusive OR operation.)

But otherwise nice work.
 
Posted by T_Smith (Member # 3734) on :
 
Bah, I live on c++. Everyone can conform around me.

Or else.

Edit: Bah, I should have caught that OR gate bit. I can still use the excuse it was late, right?

[ November 21, 2003, 12:38 PM: Message edited by: T_Smith ]
 
Posted by saxon75 (Member # 4589) on :
 
Dude, in C++, && is not the same as a bitwise AND. Breaks down like so:

&: The bitwise AND operator. You should use this for actual bit manipulation.
e.g. C = A & B

&&: The logical AND operator. You should use this for evaluating logical conditions.
e.g. if ((oaxaca == 1) && (nahdudenah == 0)) cout << "Right on!\n";

[ November 21, 2003, 12:49 PM: Message edited by: saxon75 ]
 
Posted by skrika03 (Member # 5930) on :
 
quote:
Assuming aliens did draw giant swallows, what the hell do they mean by that?
I bet Mackillian could translate for us [Evil Laugh]
 
Posted by pepperuda (Member # 1573) on :
 
You've probably all seen this, but

When does Halloween = Christmas?

In fifth grade my teacher taught us an awesome magic trick. We had 16 cards and we wrote the numbers 1-16 on them. Then we punched 5 holes at the top of the cards, and labeled them from right to left 1, 2, 4, 8, 16. We went through each of the cards individually. Starting from left to right, we decided if the hole was bigger or smaller than the number on the card. If it was greater than or equal to the number then we left it. If it was less than the number on the card, then we cut it out. Then, subtracted that number from the number on the card and went to the next hole with the new number. So on and so forth. Sorry my explanation isn't very good. Once our cards were made, we played games. You mix up the cards and then someone gives you a number 1-16, and you magically find their number, without looking, by sliding an unbent paper clip through the holes.
For example, say your number is 7(uuooo). That's what your card would look like. You slide your wire through the 8's hole. All the numbers less than 8 fall off, as well as sixteen. You pick these up, take the others off and set them aside, then slide your wire through the 4's. Only 7,6,5,4 will stay on this time. Take these cards and slide it through the 2's. Only 7,6 remain. And through the 1's only 7 remains. ta da!!!!!! It's magic. You do have to know your cards well enough to know whether to work with the ones that fall off or the ones that stay on. We thought it was incredible. It wasn't till a number of years later that I discovered that my favorite magic trick was actually just binary. By the way, I highly suggest this activity for upper elementary. I'm 26 and I still think about this activity whenever binary comes up.
 
Posted by T_Smith (Member # 3734) on :
 
Woo, well I sat through an hour of boolean algebra lecture today, and felt like bumping this thread.

Ok, we learned a few interesting things.

A*A= A (very cool indeed)
A*!A = 0
A*1 = A
A*0 = 0
A(A+B) = A
!(A*B) = !A+!B

A+A = A
A+!A = 1
A+1 = 1
A+AB = A

::trying to think::
::don't have book::
::very tired::
 
Posted by Nick (Member # 4311) on :
 
[Confused]
 
Posted by fugu13 (Member # 2859) on :
 
Boolean algebra rules.
 
Posted by Nick (Member # 4311) on :
 
I never took high math during high school. The highest math I completed with Geometry. Sad huh? I'm just about to start my first math class in college. Oh well, I'll get there. It's not that I'm bad at math, I just never learned it. Read my landmark post for more info. [Smile]
 
Posted by Hazen (Member # 161) on :
 
I am utterly befuddled by the Boolean algebra explanation. I think it would help if someone put down what each line of numbers means. I know that it has something to do with comparing digits in binary, and seeing which ones match/don't match/whatever, but when you type:
quote:
!Or:
A B Output
1 1 0
1 0 0
0 1 0
0 0 1

I am left in the dark.
 
Posted by Hobbes (Member # 433) on :
 
Well I've been planing on making boolean another Cousin Hobbes column, hopefuly this week but because of Thanksgiving maybe not until next week.

Hobbes [Smile]
 
Posted by luthe (Member # 1601) on :
 
Forget about the numbers:
Where X, Y, and Z are boolean expressions:

Idenity Laws
X AND TRUE = X
X OR FALSE = X

Domination Laws
X AND FALSE = FALSE
X OR TRUE = TRUE

Idempotent Laws
X AND X = X
X OR X = X

Commutative Laws
X AND Y = Y AND X
X OR Y = Y OR X

Associative Laws
(X AND Y) AND Z = X AND (Y AND Z)
(X OR Y) OR Z = X OR (Y OR Z)

Distributive Laws
X OR (Y AND Z) = (X OR Y) AND (X OR Z)
X AND (Y OR Z) = (X AND Y) OR (X AND Z)

De Morgan's Laws
NOT (X AND Y) = (NOT X) OR (NOT Y)
NOT (X OR Y) = (NOT X) AND (NOT Y)
 
Posted by Youth ap Orem (Member # 5582) on :
 
Boolean is bad stuff. Binary is good stuff.
Let's make mathemagic!
 
Posted by ana kata (Member # 5666) on :
 
T_Smith, when you say A+1=1, can A have any value other than 0 or 1? Cause I was picturing like four digit binary arrays or something (as my example), and obviously if A is 1010, then A+1 is 1011, not 1. For all of your other identities, my 4 digit arrays were working. [Smile]

I realize that when I follow something someone is saying, I make up a specific instance of it in my head, and then follow along with that in mind. That way I know exactly when they say something that doesn't work out. Do other people do it like that?
 
Posted by ana kata (Member # 5666) on :
 
pepperuda, I'm going to use that card magic trick for my brother's girlfriend's seventh grade math class. That's a great idea! Thanks for telling me about it!

I remember now that you teach math to kids. If you can think of any other cool things like that, would you let me know? Janie would love to hear about them. She's a very innovative teacher and was recently given two math classes, though she prefers science.
 
Posted by T_Smith (Member # 3734) on :
 
Sorry, Ana.

A = 1 or 0 only.

Whereas what you are saying is

0 + 1 = 1
1 + 1 = 1

If A = 1 or 0 the output will be 1.
 
Posted by Jon Boy (Member # 4284) on :
 
At Thanksgiving, I tried to teach my wife's cousin how to count in binary on her fingers. I'm not sure she followed, but that's okay. Counting to 512 on 10 fingers is a strange concept at first.
 
Posted by ana kata (Member # 5666) on :
 
Shouldn't you be able to count to 1023 on 10 fingers?
 
Posted by Hobbes (Member # 433) on :
 
Maybe Jon employed a parity finger.

Hobbes [Smile]
 
Posted by Jon Boy (Member # 4284) on :
 
Don't ask me. I'm an English language major.
 
Posted by Jon Boy (Member # 4284) on :
 
Okay, aka's right. With all ten fingers up (representing 1111111111), it's 1023.
 
Posted by Hobbes (Member # 433) on :
 
Fine, no one laugh at my joke, flunk out of drama school and end up like Linda Evens. "Linda Evens, Clean up on aisle 5. Evens clean up on 5".

Hobbes [Smile]
 
Posted by Sarcasm (Member # 4653) on :
 
I'd laugh at your joke if it made any sense.
 
Posted by Hobbes (Member # 433) on :
 
It does make sense if you know about parity bits. [Smile]

Hobbes [Smile]
 
Posted by rivka (Member # 4859) on :
 
*hums* ♪ bit by bit, putting it together . . .
 
Posted by ana kata (Member # 5666) on :
 
Hobbes, I burst out laughing at your parity finger. <giggles>
 


Copyright © 2008 Hatrack River Enterprises Inc. All rights reserved.
Reproduction in whole or in part without permission is prohibited.


Powered by Infopop Corporation
UBB.classic™ 6.7.2