Archive | August 2014

# Binary Code

For my computer science class, Unit 1 is going to be about how computers work and how they use data.  I first gave a poorly-written pre-test. It contains bits of recall and procedural knowledge and is not a test of critical thinking or problem solving. But I gave it because writing the assessment helped guide me in understanding the scope of Unit 1, and it will give me at least some evidence of what kids learned during the unit… important stuff in a world of data-driven teacher evaluations. Plus, it’s easy to grade, important stuff in a world of 160+ students.

Computer Architecture and Data Pre-Assessment

I made a decision to start by introducing binary code and the rationale behind it: that it’s easy for a computer to “tell” if electricity is flowing or not flowing, and harder to decode an analog value – so a code based on switches that turn on and off makes a computer’s job easy.

I showed the kids a ribbon cable.

There are a few dozen wires running parallel to each other. Each one can have an electrical pulse that is either on or off – a 1 or a 0. A code made up of 1’s and 0’s goes through this ribbon cable. You can send any information you want if you can write a code for it made of 1’s and 0’s.

I held up a card, blue on one side and white on the other. I asked the kids if I could answer a yes/no question with it. They agreed pretty quickly that blue might be yes and white might be no (or vice-versa).

Next I asked them how many cards I would need to answer a question that I could respond with yes/no/IDK. At first the group thought I would need three cards, but when they thought about it, a group of kids persuaded everyone that 2 cards would do:

Yes = BB

No = WW

IDK = BW  (or WB)

So you can represent three different codes with 2 cards.  Next I offered a challenge.  I asked the kids if they could come up with a code for the digits 0-9 using the cards. They would have to use all of the cards for every code (after all, a computer can’t choose how wide the ribbon cable is).  They partnered up, and I said when they had a strategy, they could come to me and tell me how many cards they would need.  Some groups said they needed 3 cards.  Some said they needed 4 or 5 or 6.  One group said they needed 10 cards.

Me: 10 cards? You don’t think you could come up with 10 unique codes with less than that?
Student: Well, ok.  5 cards then.
Me: Here’s 5 cards.

After a few minutes, some groups who had originally taken 3 cards approached me and said they needed another card.

Me: You need one more?
Student: I can only get 8 codes with 3 cards.
Me: How many codes can you create with 4 cards?
Student: Uh.
Me: Let me know when you find out. Here’s another card.

Students developing binary codes for numbers.

I found out that I hate the layout of my room for group work. I’m in a computer lab with fixed workstations that I can’t move. All the stations face the front of the room. Just awful for putting your heads together over writing or for walking around between groups.  I was able to converse with some groups, but I wasn’t even able to see how many groups were disengaged or doing other things, let alone intervene with them – I need to think hard about how group work is going to work in there.

Here were some of the conversations I did have with kids.
Me: Were you able to make a code for 0-9?
Student: Yep. Here it is.
Me: I see. Very systematic approach. How many codes could you make total with 4 cards?
Student: 16.
Me: Tell me why you think so.
Student: Because you do 2 for the first card, and then x2x2x2. It’s like that problem where you have to pick how many outfits you can make with the 3 sweaters and 4 pairs of socks and so on.

I also found some misconceptions, and I will need to check back in the coming days to see if they’ve been fixed. Why does this student think this?
Me: Why did you need 4 cards?
Student: Because I could only get 9 codes with the 3 cards.
Me: Tell me why it’s 9 codes.
Student: Because that’s 3×3 which is 9.
Me: Can you show me what all 9 codes are?
But then of course we ran out of time before he could show me.

Anyway, when we were done, as a whole class we shared a couple of solutions and processed how many codes a computer could make with 4 bits (16), 5 bits (32), 6 bits (64), 7 bits (128) and 8 bits (256).  I asked the students if 256 seemed to be a common and popular number and if they were starting to understand why computers liked this so much.  It’s the number of different codes you can make with 8 bits, which makes a byte. 4 bits has a cool name too – it’s a nibble.

I introduced binary place value to the kids using a place value chart. I wish I knew how to have them “discover” this on their own (is it important for them to?).  I know I was taught directly, and I know my understanding of place value improved dramatically when I actually understood other number bases.

Binary Place Value chart.

I showed them how to convert some decimal numbers to binary, like 3, 19, and 30. The kids were SO excited by this. I told them we were going to do a worksheet tomorrow and their eyes lit up. I’m not kidding. A student approached me after class and said “I think I get this and I was wondering if you could give me a little extra challenge tomorrow.”   I said “Maybe another method like base 3? Where you have the digits 0, 1, and 2?”  He said “Yeah, I’d like that!”

I had a great day and I love my job.

Number bases are not explicit in the Common Core standards, which is a shame in my humble opinion. You feel so smart when you get a different number base. But if you wanted to do a lesson like this one and attach it to CCSS, you could use this one.

CCSS.MATH.CONTENT.7.SP.C.8
Find probabilities of compound events using organized lists, tables, tree diagrams, and simulation.

# New Year, New Job!

I’m back and with a renewed commitment to blogging and social media! For the past six years, I’ve taught mostly seventh-grade math, which I have loved. I’ve always coveted a job teaching computers, however, and this year I have the opportunity to refresh and renew our Computer Science program.  Computer Science and Coding have benefited from a huge publicity push this year, with many big school districts such as New York City and Chicago deciding to add coding as a key part of curriculum for all grade levels. My school district is not diving in yet, but they’re watching my little pilot program to inform some of their decision making.  I’m trying my hand at curriculum development with three new preps.

This year I’m teaching:

6th grade: Web 2.0. This class is a district requirement, and I’m keeping almost all of the basic structure because the concepts are so important for kids just learning their way around the internet. This is a quarter-long class in which students learn internet safety and citizenship, online research and data, and computer programming. I am updating the computer programming unit to include algorithmic thinking and programming with Scratch.  I am using a limited number of the CSTA standards for elementary school, plus ISTE standards.

7th and 8th grade: Computer Science. Major topics in this class include computer and information architecture, computers and society, algorithmic thinking, and text-based programming. I plan to use a variety of programming languages but spend much of our learning using JavaScript. CSTA standards for middle school are providing a lot of the structure for this class.

7th and 8th grade: Electronics. I got the idea for this class at a workshop using PicoBoards and Scratch.  This was such a fun, kid-friendly way to learn programming and a little about electronics that I pitched the idea to my administrators to offer this elective. In the end, I purchased a class set of SparkFun Inventors’ Kits with Arduino, along with a lot of other basic electronics. In the class, I plan to cover the basics of electromagnetism, types of circuits, measurements / units and proportionality in circuits (think V = IR),  and programmable digital circuits. The mapping to standards was really “interesting” for this course. I had this conversation with a science teacher.

Me: I’m excited to teach a class on electronics. I’m going to map it to science standards since it’s sort of a science adventures class. What electronics concepts do you already teach in middle school science?
Science Teacher: Well, electricity isn’t really in our standards.
Me: In Eighth grade?  Or at all?
ST: Not really in there at all. Just kind of mentioned as a form of energy, and a little something about renewable energy.
Me: You’re kidding me. So even the basic electric circuit with the battery and the wire and the bulb…
ST: Nope.
Me: So a kid could conceivably go from elementary school all the way through to high school physics and never build or learn about circuits, or what a volt is, or how a battery works, or the series or parallel circuit or….
ST: Yeah, that’s right. In fact, if you want any of this lab equipment, help yourself. I haven’t used it in years.

I looked. He’s right. Not in there.  Electronics are briefly mentioned in the Next Generation Science Standards as a form of Energy, with a slight nod to quantifying and measuring electromagnetism.  I used what I could from the NGSS and from the CSTA standards, but this whole curriculum design raises some really interesting questions for me. A bunch of really smart people wrote our state standards and the NGSS standards. They didn’t feel electrical energy was a power standard. Why do I think it’s so important to teach, and how do I justify my thinking here?

I will be adding to this page a Wiki of the Common Core math standards and computer science / programming / electronics lessons I uncover that are good problems for those concepts. I believe we’ll really make headway in middle school computing when it’s part of the core classroom. In the meantime, I’m excited to offer this as an elective.

Onward! I am writing pre-assessments today. If you’d like to distract me by helping me puzzle through the mystery of being a standards-based teacher in a standards-based school who’s working way outside the standards-based playbook to teach something I think was a mistake to leave out… I’d love to hear your thoughts.

In closing, here are some pictures of my classroom.

I believe the classroom environment should be interesting and enriching. I found all of these junked computers in my classroom and made a museum / computing timeline! The kids love it and so do visiting parents.

I have this beauty that was just thrown in a cabinet – have not tried to turn it on yet. No floppy disks either. I may search e-bay for what I need to make it work.

Like BodyWorlds, but with a computer. My summer class did a dissection and so I arranged everything and labeled it. I also have a dissected mobile phone.

SparkFun Inventors Kits with Arduino! I’m so, so excited about using these things and the other electronics.