Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 43

Save a copy

Lesson 3:
Binary digits
Year 8 – Data Representations – Representations: from clay to silicon
Starter activity

Think about this

Which of these sequences of symbols is


most likely to represent the text ‘cat’ in a
computing device?

1 -·-· ·- -

2 110000111000111110100

3 3 1 20

4 ⠉ ⠁ ⠞
Starter activity

Think about this

Which of these sequences of symbols is


most likely to represent the text ‘cat’ in a
computing device?
The symbols commonly used in Computing are 0 and
1.

2 110000111000111110100

ASCII is a coding scheme that represents every


character as a sequence of 0s and 1s.
Objectives

In this lesson, we will...

Examine 0s and 1s in more detail.

Give these symbols a name.

Think about why we picked these


particular symbols.

Discover why there’s only two of them.


Activity 1

What do we call these symbols? a b c d e f g h i j


How many of them are there? k l m n o p q r s t
u v w x y z

We call these symbols letters.


There are 26 of them.

Sequences of letters form words.


Activity 1

cat

What is the length of this word? ▹ length: 3 letters


(How many symbols does it contain?)

Can you give another example of a 3- ▹ examples: dog, hen, pet...


letter word? or any (valid) sequence of 3 letters
Activity 1

What do we call these symbols? 0 1 2 3 4 5 6 7 8 9


How many of them are there?

We call these symbols digits.


There are 10 of them.

Sequences of digits form numbers.


Activity 1

314

What is the length of this number? ▹ length: 3 digits


(How many symbols does it contain?)

Can you give another example of a 3-digit ▹ examples: 123, 890, 007...
number? simply select a digit from 0 to 9 three times

How many 3-digit numbers can there ▹ 10⨉10⨉10 = 103 = 1000


possibly be? possible 3-digit numbers
Activity 1

What do we call these symbols? 0 1


How many of them are there?

We call these symbols binary digits.


There are only 2 of them.

Common abbreviation:
bi nary digi t = bit


Activity 1

What do we call these symbols? 0 1


How many of them are there?

We call these symbols binary digits.


There are only 2 of them.
Activity 1

Takeaway

Binary digits are symbols, letters


just like letters and words. a b c d e f g h i j
k l m n o p q r s t
Binary digits are the symbols that u v w x y z
digital devices use to do their
‘writing’. digits
0 1 2 3 4 5 6 7 8 9

binary digits
0 1
Activity 2

First few bits

101

What is the length of this sequence? Think, write, pair, share


(How many symbols does it contain?)
Write your individual answers on your worksheet,
before sharing.
Can you provide another example of a 3-
bit sequence?

How many 3-bit numbers can there


possibly be?
Activity 2

First few bits: answers

101

What is the length of this sequence? ▹ length: 3 binary digits, or 3 bits


(How many symbols does it contain?)

Can you provide another example of a 3- ▹ examples: 111, 110, 000...


bit sequence? simply select 0 or 1 three times

How many 3-bit numbers can there ▹ 2⨉2⨉2 = 23 = 8


possibly be? possible 3-bit sequences
Activity 3

Example

The bits behind the tweets

Twitter is a social networking service.


Activity 3

Example

The bits behind the tweets

First message posted (in 2006) was:


just setting up my twttr

Twitter’s coding scheme represents English


characters as 8-bit sequences.

Question

How many binary digits does it take to


represent this message?
Activity 3

Example

The bits behind the tweets j


01101010
First message posted (in 2006) was: u
just setting up my twttr 11010101
s
Twitter’s coding scheme represents English 01110011
characters as 8-bit sequences. t
01110100
Question ▹ 24 characters in the message
8 bits for each character
00100000
How many binary digits does it take to 24 ⨉s 8 = 192 bits
represent this message?
01110011 ...
Activity 3

Counting bits

Explore the binary digits behind text


messages and programs.
And do some counting!

Write the answers on your worksheet


Activity 3

Counting bits: answers

Explore the binary digits behind text Check your answers against the ones
messages and programs. provided and correct any mistakes.
And do some counting! Ask a classmate if you are in doubt. If a classmate
cannot help you, ask your teacher.
Activity 4

Counting sequences

Let’s explore what happens as we create


longer and longer sequences of binary
digits.

Follow along on your worksheet.


Activity 4

Counting sequences

How many 1-bit sequences can there 1 bit


possibly be? 0
2 1
Activity 4

Counting sequences

How many 1-bit sequences can there 1 bit 2 bit


possibly be? 0
2 1
How many 2-bit sequences can there
possibly be?
Activity 4

Counting sequences

How many 1-bit sequences can there 1 bit 2 bit


possibly be? 0 00
2 1 01
How many 2-bit sequences can there 10
possibly be? 11
Activity 4

Counting sequences

How many 1-bit sequences can there 1 bit 2 bit


possibly be? 0 00
2 1 01
How many 2-bit sequences can there 10
possibly be? 11
4 (twice the number of 1-bit sequences)
Activity 4

Counting sequences

How many 1-bit sequences can there 1 bit 2 bit 3 bit


possibly be? 0 00
2 1 01
How many 2-bit sequences can there 10
possibly be? 11
4 (twice the number of 1-bit sequences)

How many 3-bit sequences can there


possibly be?
Activity 4

Counting sequences

How many 1-bit sequences can there 1 bit 2 bit 3 bit


possibly be? 0 00 000
2 1 01 001
How many 2-bit sequences can there 10 010
possibly be? 11 011
4 (twice the number of 1-bit sequences) 100
101
How many 3-bit sequences can there 110
possibly be?
111
Activity 4

Counting sequences

How many 1-bit sequences can there 1 bit 2 bit 3 bit


possibly be? 0 000
00
2 1 001
01
How many 2-bit sequences can there 010
possibly be?
10 011
11 100
4 (twice the number of 1-bit sequences)
101
How many 3-bit sequences can there 110
possibly be?
111
8 (twice the number of 2-bit sequences)
Activity 4

Takeaway

With every additional bit, the number of


possible bit sequences doubles.
Activity 4

Example

In telegraphy, each character was encoded


using a sequence of 5 bits.

How many characters can be encoded


using 5 bits?

Is that sufficient to encode letters, digits,


and symbols?
Activity 4

Example

In telegraphy, each character was encoded


using a sequence of 5 bits.

How many 5-bit sequences can there


possibly be?

Is that sufficient to encode letters, digits


and symbols?
Activity 4

Example

In telegraphy, each character was encoded


using a sequence of 5 bits.

How many 5-bit sequences can there ▹ 2⨉2⨉2⨉2⨉2 = 25 = 32


possibly be? possible 5-bit sequences

Is that sufficient to encode letters, digits, ▹ 26 letters, 52 for both cases


and symbols? 10 digits
over 20 symbols
5 bits are not sufficient
Activity 4

Example

In telegraphy, each character was encoded


using a sequence of 5 bits.

In practice, each sequence was associated with both a letter and a ‘figure’.
Special sequences switched between letter mode and figure mode.
Activity 4

Counting sequences

ASCII uses sequences of 7 bits to


represent characters.
Explore if that is sufficient to encode
letters, digits, and symbols.

Write the answers on your worksheet.


Activity 4

Counting sequences: answers

ASCII uses sequences of 7 bits to Check your answers against the ones
represent characters. provided and correct any mistakes.
Explore if that is sufficient to encode Ask a peer if you are in doubt. If a peer cannot help
letters, digits, and symbols. you, ask your teacher.

Write the answers on your worksheet.


Activity 5

But why 0 and 1?

Why not use any other pair of symbols?

We could have picked any other pair of


symbols!
There is nothing special about them.

But 0 and 1 are convenient for


representing numbers.
(More about that in the next lesson.)
Activity 5

But why binary?

Why use just 2 symbols?


Why not 10, or 26, like humans?

Building binary systems is simpler.

You can build a binary system using


circuits of interconnected switches.

Each switch is binary:


it has two possible states.
Activity 5

But why binary?

Electronic devices are built using circuits


of interconnected switches that control
the flow of electricity.

The switches take on various forms.


Activity 5

But why binary?

Electronic devices are built using circuits


of interconnected switches that control
the flow of electricity.

The switches take on various forms.

Relay switches (c. 1840)


Vacuum tubes or valves (c. 1940)
Activity 5

But why binary?

Electronic devices are built using circuits


of interconnected switches that control
the flow of electricity.

The switches take on various forms.

Transistors (c. 1950)


Activity 5

But why binary?

Electronic devices are built using circuits


of interconnected switches that control
the flow of electricity.

Now, the circuits of silicon-based


switches are packaged.

But inside these packages,


we find the intricate patterns
of billions of interconnected switches,

now as big as a few atoms.


Activity 5

But why binary?

Electronic devices are built using circuits


of interconnected switches that control
the flow of electricity.

This describes what happens in your


computer’s:
processors (CPU, GPU)
main memory (RAM)
storage devices (SD cards, SSDs)
and any electronic component
Activity 6

Lesson takeaways

Write your lesson takeaways on a sticky note.


Activity 6

Lesson takeaways

0s and 1s are called binary All characters are


digits, or bits. represented using
sequences of bits.

Binary digits are like letters; they


are the symbols that computers Computers use two symbols
‘write’ with. because they are built out of
switches.
Summary

Next lesson

In this lesson, we... Next lesson, we will...

Called 0s and 1s binary digits, or bits. Explore how natural numbers can be
represented as sequences of binary digits.
Hinted at why it’s convenient to only use
two symbols, and why it’s these two.

You might also like