🎯 Learning Objectives
Develop the Data & Data Representation Learning Strands:
- Explain what binary digits (bits) are, in terms of familiar symbols such as digits or letters
- Measure the size or length of a sequence of bits as the number of binary digits that it contains
💬 Key Vocabulary
- Representations
- communication
- symbols
- processing
- binary digits
- digital systems
📝 Starter Activity – Think about this
Which of these sequences of symbols is most likely to represent the text ‘cat’ in a computing device?
- -·-· ·- –
- 110000111000111110100
- 3 1 20
- ⠉ ⠁ ⠞
Answers
The symbols commonly used in Computer Science are 0 and 1.
So the answer would be 2. 110000111000111110100
ASCII is a coding scheme that represents every character as a sequence of 0s and 1s.
📖 Data Representation
What do we call these symbols?
How many of them are there?
Answers
We call these symbols letters.
There are 26 of them.
Sequences of letters form words.
What is the length of this word?
(How many symbols does it contain?)
Can you give another example of a 3-letter word?
cat
What do we call these symbols?
How many of them are there?
0 1 2 3 4 5 6 7 8 9
What is the length of this number?
Can you give another example of a 3-digit number?
How many 3-digit numbers can there possibly be?
314
What do we call these symbols?
How many of them are there?
0 1
Answers
We call these symbols binary digits.
There are only 2 of them.
Common abbreviation:
binary digit = bit
📖 Takeaway
Binary digits are symbols, just like letters and words.
Binary digits are the symbols that digital devices use to do their ‘writing’.
Binary digits are just another pair of symbols. Just as we use the term ‘letter’ to refer to any of the 26 symbols, and the term ‘digit’ to refer to any of the 10 symbols, we use the term ‘binary digit’ or ‘bit’ to refer to any of these two symbols. It’s essentially the symbols that digital devices use to do their ‘writing’.
letters
a b c d e f g h i j k l m n o p q r s t u v w x y z
digits
0 1 2 3 4 5 6 7 8 9
binary digits
0 1
📝 Silver Badge – First few bits
📖 The bits behind the tweets
Twitter is a social networking service.
First message posted (in 2006) was:
just setting up my twttr
Twitter’s coding scheme represents English characters as 8-bit sequences.
- 24 characters in the message
- 8 bits for each character
- 24 ⨉ 8 = 192 bits
📝 Gold Badge – Counting bits
Explore the binary digits behind text messages and programs.
And do some counting!
📝 Platinum Badge – Counting sequences
Let’s explore what happens as we create longer and longer sequences of binary digits.
Look at the animation above, follow the process and then check your understanding by reading the following explanation.
With one bit, there are only two ‘sequences’ that you can create. These are the two sequences in the first column of the image above.
- Copy the two sequences from the first column to the second
- Add a 0 in front of them
- Again, copy the two sequences from the first column to the second
- Add a 1 in front of them
You have just constructed all of the possible 2-bit sequences. There should be four of them — twice as many as before.
- Copy the four sequences from the second column to the third
- Add a 0 in front of them
- Again, copy the four sequences from the second column to the third
- Add a 1 in front of them
You have just constructed all of the possible 3-bit sequences. There should be eight of them — twice as many as before.
Takeaway
For every bit that you add, you can construct twice as many bit sequences.
📖 Counting bits in real life
Let’s explore what happens as we create longer and longer sequences of binary digits.
In telegraphy, each character was encoded using a sequence of 5 bits.
- How many 5-bit sequences can there possibly be?
2⨉2⨉2⨉2⨉2 = 25 = 32 possible 5-bit sequences
- Is that sufficient to encode letters, digits, and symbols?
There are 26 letters, 52 for both cases, 10 digits, over 20 symbols
5 bits are not sufficient
📝 Platinum Badge continued
ASCII uses sequences of 7 bits to represent characters.
Explore if that is sufficient to encode letters, digits, and symbols.
📖 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.)
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.
📖 But why binary?
Electronic devices are built using circuits of interconnected switches that control the flow of electricity.
The switches take on various forms.
These days, 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.
This describes what happens in your computer’s:
- processors (CPU, GPU)
- main memory (RAM)
- storage devices (SD cards, SSDs)
- and any electronic component
📖 Lesson takeaways
In this lesson, you…
- Examined 0s and 1s in detail.
- Gave these symbols a name.
- Thought about why we picked these particular symbols.
- Discovered why there’s only two of them.
Next lesson, you will…
- Explore how natural numbers can be represented as sequences of binary digits.
🏅 Badge it
🥈 Silver Badge
- Complete the questions in the form in the Silver Badge task – First few bits.
🥇 Gold Badge
- Complete the questions in the form in the Gold Badge task – Counting bits.
🥉 Platinum Badge
- Complete the questions in the form in the Platinum Badge task – Counting sequences.