AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Ones and zeros

Week 6 · Unit 3: Computer storage · 3 lessons
2

Bits and bytes

Computing 5: Unit 3, pp. 34–43
GoalSay what a bit and a byte are, and how one character is stored with a code.
New words
bit · one binary digit, 0 or 1; the smallest piece of databyte · a group of 8 bitscharacter · a letter, digit, punctuation mark, symbol or spaceASCII · the code table that all computers share; it gives each character its own 8-bit code
Explanation

A bit is a single binary digit, 0 or 1. It is the smallest piece of data that a computer can store. Eight bits make a byte. One byte stores one character. A character can be a letter, a digit, a punctuation mark or even a space. All computers share one code table, called ASCII. In it each character has its own 8-bit code. Capital letters and small letters have different patterns. To make a byte easier to read, we often write it as two groups of four, such as 0100 0001. When you press A, the keyboard sends a signal, the computer changes it into 0100 0001, and a screen shows the letter A again.

01000001
Worked examples
CharacterByteCharacterByte
A0100 0001a0110 0001
B0100 0010b0110 0010
C0100 0011c0110 0011
D0100 0100d0110 0100
E0100 0101e0110 0101
space0010 0000!0010 0001
Here is part of the ASCII table. Each byte has 8 bits. For example, the byte for B is 0100 0010.
010000110100000101000010
Decoding means turning bits back into characters. The three bytes in the picture are C, A and B in the code table, so they spell CAB. Three characters need three bytes.
0100000101100001
Capital A and small a differ in one bit only: the third bit from the left. That is why a computer can tell them apart.
Class activity

Secret bytes (2 players, paper and a pencil, or 8 coins). Use the code table in the lesson. Player 1 writes a short word using the letters A to E, such as BEAD, as one byte for each letter. Player 2 uses the table to decode it. Then swap roles. How many bytes did your word need? How many bits is that? Can you make a word with a capital letter and small letters?

Practice
1
How many bits are in one byte? How many bits are in 3 bytes?
2
Use the code table to decode these three bytes.
010000100100010101000100
3
Write the three bytes for the word Ace, with a capital A and small c and e.
4
One of these two bytes is the small letter d. Which one is it?
0100010001100100