Chapter 17: Binary Codes

Download Report

Transcript Chapter 17: Binary Codes

Introduction to Coding
…Often starts with a problem
that needs to be solved
They are:

Creative problem solvers, Psychologists
Artists, Authors, and yes, even actual Scientists
They are needed in:

Biology, video gaming, schools, health care,
public service, and anywhere that innovation is
involved!

1. Automate - To make something happen
automatically (without help from people)

2. Computer Science – The art of blending
human ideas and digital tools to increase
problem solving power

3. Computer Scientist – A person who is
skilled at modifying problems for digital
solutions





Data – Information, including facts, samples,
names, and numbers
Environment – The world we live in
Interface – The way something allows you to
connect with it
Programming – Writing instructions for a
digital tool
Simulation – Pretending to be (a stand-in for)
the real thing
 Can you think of a problem that a computer
scientist could solve?
 Have you ever seen a computer simulation before?
Describe it.
 What other jobs could benefit from the help of
computer science?
 Are there any jobs that you can think of where
understanding computers would not be useful?
Do you think there will be more or fewer of those
in 5 years?
Technology vs. Physical Movement:
 What happens to your muscles when you stop
using them?
 Your eyes have muscles, too. How do you think
you could get them extra exercise?
Technology vs. Environment:
 What other electricity do you use that you could
try to save?
 Is there anything else you could recycle to help
offset paper use?
Technology vs. Philanthropy
 How would you help the world if you were a
computer scientist?
 Who is the first person that you are going to
teach this to once you learn it?

A binary code is a system for encoding data
made up of 0’s and 1’s

Examples
 Morse code (dash = 1, dot = 0)
 Braille (raised bump = 1, flat surface = 0)
 Movie ratings (thumbs up = 1, thumbs down = 0)

CD, MP3, and DVD players, digital TV, cell
phones, the Internet, space probes, etc. all
represent data as strings of 0’s and 1’s rather
than digits 0-9 and letters A-Z

Whenever information needs to be digitally
transmitted from one location to another, a
binary code is used

The Decimal System is a “Base 10 System”.
That simply means it uses 10 symbols
 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)

The Binary System is a “Base 2 System”. It only
uses 2 symbols
 (0 and 1)

Only 2 symbols are necessary because
computers/electronics recognize only
 “ON” (represented by “1”) and
 “OFF” (represented by “0”)


This 2 symbol system is crucial to computers
because it increases speed, memory, and
utilization
These binary digits (“0” and “1”) are known as
“bits”

For example, in the Decimal System, with the
number 150
 The “ones” column is represented by 0
 The “tens” column is represented by 5
 The “hundredths” column is represented by 1

As we go from right to left, the columns
represent increasing powers of 10. Ones to
tens, tens to hundredths, etc.

However, the Binary Number System, from
right to left increases in powers of 2
 (128, 64, 32, 16, 8, 4, 2, 1)

To easily determine the value of each column
we can deduce what the number is by whether
there is a “1” (yes to that value) or “0” (none of
that value) in the column

Let’s take the binary number: 10
The column on the far right is the “1” column and
the “0” indicates no value present.
The column on the left is the “2” column and the
“1” means there is a value of “2” present.
So, “10” in binary (remember this reads as “1”
and “0”, not “ten”) = “2” in the decimal system.

Now let’s watch a brief video to better
understand how to convert numbers from binary
to decimal and decimal to binary.
Binary Numbers in 60 seconds:
https://www.youtube.com/watch?v=qdFmSlFojIw


Let’s Practice!
We are going to simulate a computer and “store”
letters of the alphabet as binary.
https://www.youtube.com/watch?v=wCQSIub_g7M
 “Decoder” Activity

 Binary Decoder Key, Graph Paper
 Encode first name and last initial
 Skip a line
 Encode a random minimum six letter word
 Exchange and decode classmate’s word
 4 x 4 square with 1st and last initial in bit value
 How many squares will you need to
store your first, middle, and last
names altogether?
 My name:
Christine Diane Claxton
21 (letters) x 8 (bits per character) =
168 squares needed