B-3 Binary Coding

B-3 Binary Coding

This is an unplugged lesson. Students will explore how text, images and audio can be represented using Binary.

OBJECTIVES: By the end of this lesson, students will:

    • recognize that everything you do on a computer is processed and stored as Binary (0s and 1s).

    • extrapolate that all data on a computer: text, image, sounds and movies must be stored and processed as binary ( 0s and 1s).

Do Now (5 minutes)

Watch video (5.60) then discuss the following question:

      • What is a Bit?

      • Can you represent images in Binary?

      • Can you represent Sound in Binary?

TEACHER GUIDANCE:

    • The smallest piece of information a computer can store. A wire that is either on or off.

    • Yes. Each pixel can be broken down to three colors, Red Green Blue, which can be represented by a number.

    • Yes, any point on a sound wave can be represented by a number.

Activity (45 minutes)

Choose two activities from list below: eg. TEXT with Extension | TEXT with AUDIO | TEXT with IMAGES |IMAGES with AUDIO.

Learning Goal:

Everything you see and do on a computer is translated into 0s and 1s - Binary. Numbers, text, images and audio are all stored as Binary.

TEXT in Binary:

Students write their names in Binary and or HEX.

Student Name Handout or Student Bracelet Handout | TeacherPage Code.org

Both examples use ASCII code to translate the english alphabet into binary numbers. For more on ASCII, see teacher guidance.

Extension: Make a Bracelet, Lego structure or Name tag in Binary or HEX Binary Converter

    • Create a bracelet or necklace of your name using binary beads. Note: Perler fuse beads work great and are cheap.

    • Create a name-tag of your name in Binary and Hexadecimal.

    • Create a name in Binary using Lego.

IMAGES in Binary:

Students translate images into binary.

AUDIO in Binary:

Students translate sound into binary then decode it into letters.

TEACHER GUIDANCE: ASCII stands for American Standard Code for Information Interchange.

Students may ask, why does "A" start at 1000001 (number 65 in base 10) and "a" start at 1100001 ( number 97 in base 10) in ASCII code?

The ASCII Conversion Chart shows all the keyboard symbols that ASCII represents. Note: number 0-64 represent non-alpha keyboard characters.

ACSII characters are always stored as 8 bits = 1 byte. The last bit is used for error checking, allowing the other 7 bits to store 128 uniques characters.

Some languages have more than 128 characters, eg Mandarin. Unicode, is a code that uses 32 bits = 4 bytes to store each character symbol. Unicode takes four times more storage space but it allows for over 1 million unique character symbols. Unicode can store any alphabet in the world in binary format.

Unicode has now become the global standard, as it can represent characters from languages from all around the world.

This chart also shows HEX - Hexadecimal numbers. Hex numbers use 16 symbols: 0 1 2 3 4 5 6 7 8 9 A B C D E F and work as a base16 number system.

Each Hex represents 4 bits also called an nibble. This means just two hex numbers can represent a Binary Byte. eg 1111 1111 in Binary = 7F in HEX.

People can't memorize Binary numbers. People have an easier job writing and memorizing Hex numbers, which is why we use them.

Your computer Mac ID, Color RGB, and product serial numbers are all stored as HEX numbers.

Close-Out (5 minutes)

Discuss the following questions:

    • Why does a computer store information in Binary?

    • Can images, text and movies be stored in binary code 0s and 1s?

    • Students may enjoy using this ASCII to Binary converter.

TEACHER GUIDANCE:

-A computer is made up of electrical circuits or switches that are either on or off. At the lowest level, the computer needs to translate everything into an on or off signal. Binary stores information as 1( on) or 0 (off).

-Yes. All information and software on a computer is coded into binary, as the computer only understands two states: on (1) or off (0).

Standards

    • CSTA 2-DA-07: Represent data using multiple encoding schemes.