Scratch - Converting Decimals To Binary (Lesson Plan) Week 4
Scratch - Converting Decimals To Binary (Lesson Plan) Week 4
decimals to binary
1.5 to 2 hours
Description
In this lesson, students will review binary code for decimal numbers and use Scratch to
create a binary number converter. The lesson involves hands-on activities, flowchart
creation, and Scratch coding to convert decimal numbers to binary.
Learning outcomes
By the end of this lesson, students will be able to:
Students will understand the concept of binary numbers and how they
relate to decimal numbers
Students will create a Scratch project that converts decimal numbers
to binary
Students will demonstrate use of join, mod and floor blocks
Resources Vocabulary
Teacher binary
C4K Dashboard decimal
algorithm
Students variable
Log into C4K Dashboard loop
Scratch: Game modulus (mod)
floor function
string
conversion
Tabs Description
15 minutes
Students should access the lesson via logging in to the c4k.io.
Present the student workspace so that it acts as a presentation, where
students can follow along.
Review the concept of binary numbers and why computers use binary.
Discuss the difference between decimal (base-10) and binary (base-2)
number systems.
What is binary?
Binary is a way of counting, just like the decimal system we use
every day. But while the decimal system is base-10 (using digits
0-9), binary is base-2, which only uses two digits: 0 and 1. Each
binary digit is called a "bit."
Why do computers use binary?
Computers are made up of billions of tiny switches called
transistors. Each transistor can either be on (represented by 1) or
off (represented by 0). This makes binary the perfect language for
computers to process and store information using only
combinations of 0s and 1s.
Comparing decimal and binary
In the decimal system, each place represents a power of 10 (like
10, 100, 1000). In binary, each place represents a power of 2 (like
2, 4, 8, 16). For example:
Decimal 5 is written in binary as 101 because it represents
1×4+0×2+1×1=51 \times 4 + 0 \times 2 + 1 \ times 1 = 51×4+0×2+1×1=5.
The following are explanations and additional discussion points for certain
tabs:
Task 1 - Explain to your students: Use your hands in a fun activity to
review how binary numbers work.
Hold up one hand in front of you.
Imagine each finger represents a power of 2, starting from the
thumb: Thumb = 1; Index finger = 2; Middle finger = 4; Ring finger =
8; Pinky finger = 16
Count in binary by raising or lowering fingers.
A raised finger means 1, and a lowered finger means 0. For
example: Raise only your thumb = 1 in binary (which is 1 in decimal)
or your index finger = 10 in binary (which is 2 in decimal).
60 minutes
The following are explanations and additional discussion points for certain
tabs:
Discussion - Read through the tab with your students. Provide time
for them to discuss the following:
Use the animated gif to give you clues on how to convert from any
decimal number to binary.
Task 3 - Students complete the table of conversions without the aid
of their fingers.
Task 4 - Students can create their flowchart digitally or on paper.
The flowchart should be an explanation of how to convert
decimals to binary using the tasks covered to assist them.
Task 5 - Students are directed to a Scratch Binary Conversion game.
They should answer the following questions:
What is the objective of your Scratch project?
Name the variables that you will create.
What loops or repetitions will you need?
Instructions 1-6 - Students create a new project in Scratch and follow
the steps presented in the various instruction tabs.
Step 1 requires students to create variables.
Step 2: Getting started with the game. Students will add the first 2
starter blocks.
Step 3: Students set up the question for the game.
Step 4: Students create a loop.
Step 5: Students start to code the calculations.
Step 6: Students continue coding the calculations.
Step 7: Students complete coding the calculations.
Step 8: Students complete the missing code that allows for an
answer.
Checkpoint - Students should check and debug their algorithms if
needed.
Assessment
Progression can be tracked in the teacher recording sheet or via the teacher
dashboard online.
Task 1
Task 2
Task 4
This is an example of what a student could come up with it.