Tuesday, September 23, 2014

Computer Science Day 3 - More on Binary

We're still going strong with computer science in the classroom!

Today was my first time teaching the follow-up lesson to last time: the binary number system.

We began with a review of converting binary numbers into numbers we regularly use (decimal system). In some classes, I was able to use Socrative (if you have an account, you can access the quiz I made using this as the SOC number: 12813040) again to quickly get a sense of what kids remembered from last time. This also made it really easy to fix mistakes, since I was able to identify exactly who was misunderstanding the content and what they were doing wrong. We again posted correct and incorrect answers on the board, so students had to identify which one was correct and why, as well as which ones were incorrect and what mistakes students may have made. This allowed us to fix up mistakes and benefitted the whole class: seeing what a classmate did incorrectly helped others make sure they avoided the mistake themselves!

Today, though, the main goal was for students to see that binary numbers can be used in a coding system to create letters and symbols. We started by counting the keys on a keyboard: How many different symbols does a computer need to recognize? We established that it's around 128, since letters have both lower- and upper-case, along with several other two-function keys. I then challenged the students to figure out how many bits (binary digits; 0's and 1's, in other words) it would take to store 128 different symbols. They used pattern detection to see that each place value is twice the previous's value, so they would need seven bits to produce 128 different symbols, including zero. This took us straight into ASCII - how some dudes sat around and came up with a standard system for these symbols and decided that 01000001 should represent A, 00100000 should represent a space, etc...

This was the lightbulb moment for several students - they started to see that we could translate numbers into letters, if each letter was represented by a code! I then showed them code.org's Binary Decoder Key (see page 7) from the K-8 Intro course. I used some black and white square tiles to show my initials, but they had to figure that out on their own. We connected black and white squares to 0's and 1's, learned that 8 bits is 1 byte, and then started sending binary text messages to each other on scratch paper! :-)

The kids were WAY into a coding system for letters - any time they get to send secret messages, they're hooked. We kept them short for now, since it was a partner's job to actually decode the things!

I then passed out a packet of worksheet activities from CS Unplugged that they'll complete for next time. I adapted the CS Unplugged sheets to allow for space for students to answer the questions, and I re-phrased some of the wording to make the questions clearer.

Oh, and I removed the part of one sheet where it asked kids to try counting in binary on their fingers, since once they hit the number 4 they'll be giving someone the finger...They can learn that on their own!

I also thought it was a great opportunity to talk about all the different ways binary messages are sent (see page 10) - how CDs and DVDs use tiny grooves on their surfaces that either do or do not reflect light, magnetic strips on tapes were used to store hard drive data, and the biggie: an old-school computer modem connecting over dial-up to the Internet! This visual was awesome at showing how data could be sent and received in this way, and the kids found it pretty interesting, I think. Well, they at least thought the sounds were funny...

Next time, we're onto depicting images using numbers. We'll lay off the binary for a bit (get it?) and just use decimals to code images, but I'll still be pulling from CS Unplugged. I figure 2-3 days of images, throwing in code.org's Graph Paper Programming, and then we'll hop on the computers and start to learn some algorithms!
Post a Comment