A2 Solutions - Bits and Bytes

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Year 8 – Representations: from clay to silicon Solutions to learner worksheet

Lesson 5 – Large quantities


Save a copy

Bits and bytes: solutions


Problem 1 Simple
A user comes across a small text file in her hard disk. The name of the file is ‘simple’ and
its size is 12 bytes.

Name Size Type

simple 12 bytes Text

Question Your answer ▿

How many binary digits (bits) Number of bits in the file: 96 bits
does this file contain?
There are 8 bits in a byte.

So there are 8 x 12 = 96 bits in the file.

Problem 2 Symbols
The table below contains examples of a few symbols, and their binary encodings in the
UTF-8 coding scheme.

Fill in the last column of the table: how many bytes are required for each of the
characters?

Binary Number of bytes


Character Number of bits
Representation ▿

@ 01000000 8 8 / 8 = 1 byte

11000010
£ 10100011
16 16 / 8 = 2 bytes

11100010
⁂ 10000001 24 24 / 8 = 3 bytes
10000010

11110000
10011101
𝄞 32 32 / 8 = 4 bytes
10000100
10011110

Page 1 Last updated: 09-09-19


Year 8 – Representations: from clay to silicon Solutions to learner worksheet
Lesson 5 – Large quantities
Save a copy

Problem 3 ASCII art


ASCII art involves creating pictures using characters (such as letters, symbols, and
numbers). Here is an example:

! |\_/| !
! -(@ @)- !
!--oOO--(_)-OOo---!

Questions Your answers ▿

Every character is represented by Bytes for each character: 1 byte


a sequence of 8 bits.

How many bytes are required for


There are 8 bits in a byte,
one individual character in the so 1 byte is required for each character.
image?

In this image, there are 3 lines, with Total number of characters in the image:
20 characters in each line. 60 characters
This includes spaces and the special
characters that move to the next line. There are 3 x 20 = 60 characters in the
image.
How many characters are in the
image in total?

How many bits are required for Bits for the entire image: 480 bits
representing the entire image?
There are 60 characters in the image.
Each character requires 8 bits,
so the image requires 60 x 8 = 480 bits.
How many bytes are required for Bytes for the entire image: 60 bytes
representing the entire image?
There are 60 characters in the image.
Each character requires 1 byte,
so the image requires 60 bytes.

This resource is available online at ncce.io/rep1-5-a2-s. Resources are updated regularly — please check that
you are using the latest version.

This resource is licensed under the Open Government Licence, version 3. For more information on this
licence, see ncce.io/ogl.

Page 2 Last updated: 09-09-19

You might also like