Friday, March 20, 2020

Binary with Year 7

My Year 7 coding class are learning to make their mBots become autonomous cars. Part of that is to use the infra red sensor underneath the mBot to sense and follow a black line. To do this, the students need to understand a little about binary.

We started today talking about how they counted.
They all started counting for me out loud.
Then I asked them to add two single digit numbers together in their heads. Easy peasy. Answers were shouted out. Then I asked them to add 9 and 23. This took a bit longer in the head, and fingers were twiddled and counted.

Then I asked them to addf 329 and 73 in their heads. Some got there.
This was then written as sum on the board and they were all comfortable again.
I asked them how we know where to put the 73 under the 329 as they are different widths / numbers of digits. They then told me about units, tens and hundreds. Their teacher at intermediate will be proud of them.



After they had mentioned the units, tens and hundreds, we talked about how we count.
The name was DECIMAL as it is based on 10's. Every step to the left is 10 times bigger. We put numbers in them place slots tos ay how many of them there are of each.




I then introduced a new counting method. BINARY.
I used the class light switch as an example. How many switch places are there? 2. The switch can be on or off. The lights can be on or off. There are no threes or fours or others numbers. It is yeas or no.

BINARY counts in multiples of 2. I put the columns up to show them the difference. Each step to the left is multiplied by two this time. We did a few numbers together till they got it. 



Binary Games

The first game we played was in the car park outside. The students put themselves into teams of four for the four columns we had been using in our binary examples. They each had two pieces of paper. One with a 1 on it and one with a 0 on it.
I wrote down numbers on a card and held it up. The teams had to shuffle themselves with their paper to be sowing the correct value in binary.






Here is a slightly chaotic video ...




When we went back into the classroom, I had some binary games ready on my class site for them to have a go at.
Link to class site where the binary games are.

I thought that they might not appreciate this lesson as we did not use the mBots today, so they go no direct coding done. They did play some of the coding games that I have on my site too, but did not code the mBots.
Next week I plan to "test" their binary knowledge to see if what we did today was ok. This "test" will be in the form of an online quiz / game so they don't feel tested.
I hope this was enough for them to understand why we have to use a bit of binary when we code our rmBots to react to the black line.

No comments:

Post a Comment