Year 7 Data Rep Booklet 1.2
Year 7 Data Rep Booklet 1.2
Computer Science
Year 7
Data Representation Topic
Contents
1) What is binary
2) Denary to binary conversions
3) Binary to denary conversions
4) Binary addition
5) Binary addition Pt.2
6) Binary addition Pt.3
7) Binary subtraction continued
8) An Introduction to Hexadecimals
9) Hexadecimals continued
10) Exam based Questions
11) Sign magnitude
12) Two’s compliment
13) Two’s compliment and sign magnitude continued
14) Exam questions
15) Answers
1|Page
YEAR 7 CS BOOKLET – Spr 2.1
1. Ensure your child has completed all of the tasks by reviewing their answers with them
2. Ensure your child has a deep think about the questions to ask yourself sections
3. Ensure you cooperate with your child’s learning experience by reading the “How can parents
help” section of each lesson
4. Review with your child the summarisation of each lesson to help consolidate learning effectively
5. Ensure your child does not rush through each lesson as each lesson has many new concepts and
theory, they will be unfamiliar with
6. Lastly, please do not pressure your child to finish the booklet at a fast pace as this can confuse
and disjoint the learning experience. The booklet is created to last the entire term and so should
be approached in such a manner, unless your child is feeling up to the challenge of moving ahead
2|Page
YEAR 7 CS BOOKLET – Spr 2.1
What is binary?
Binary is a number system that only uses two digits: 1 and 0. All information that is processed
by a computer is in the form of a sequence of 1s and 0s. Therefore, all data that we want a
computer to process needs to be converted into binary.
Understanding denary
People use the denary (or decimal) number system in their day-to-day lives. This system has 10
digits that we can use: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
The value of each place value is calculated by multiplying by 10 (ie by the power of 10). The first
few place values look like this:
To convert a binary number to denary, start by writing out the binary place values. In denary, the
place values are 1, 10, 100, 1000, etc – each place value is 10 times bigger than the last. In
binary, each place value is 2 times bigger than the last (ie increased by the power of 2). The first
few binary place values look like this:
128 64 32 16 8 4 2 1
128 64 32 16 8 4 2 1
1 0 1 0 1 0 0 0
128 + 0+ 32 + 0+ 8+ 0+ 0+ 0
In computing, an overflow error can occur when a calculation is run but the computer is unable to store the
answer correctly. All computers have a predefined range of values they can represent or store. Overflow
errors occur when the execution of a set of instructions return a value outside of this range.
Task 1:
1) What is binary?
3|Page
YEAR 7 CS BOOKLET – Spr 2.1
_____________________________________________________________________
_____________________________________________________________________
Task 2:
1- What is an overflow error?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Glossary of words:
1. binary
A number system that contains two symbols, 0 and 1. Also known as base 2.
2. data
Units of information. In computing there can be different data types, including integers,
characters and Boolean. Data is often acted on by instructions.
3. denary
The number system most commonly used by people. It contains 10 unique digits 0 to 9.
Also known as decimal or base 10.
4. place value
Th12e value of the place, or position, of a digit in a number
4|Page
YEAR 7 CS BOOKLET – Spr 2.1
LESSON 2: DERNARY TO BINARY CONVERSIONS
TASK 2:
5|Page
YEAR 7 CS BOOKLET – Spr 2.1
128 64 32 16 8 4 2 1
128 + 64 + 16 + 4 + 2 + 1
128 64 32 16 8 4 2 1
1 1 0 1 0 1 1 1 = 215 < And that is our answer. We have now converted from binary
into denary.
6|Page
YEAR 7 CS BOOKLET – Spr 2.1
Task 1:
7|Page
YEAR 7 CS BOOKLET – Spr 2.1
Task 1:
8|Page
YEAR 7 CS BOOKLET – Spr 2.1
Task 2:
9|Page
YEAR 7 CS BOOKLET – Spr 2.1
LESSON 4: More Conversions
10 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
LESSON 5: What is binary
When two numbers are added together in decimal, we take the first number, add the
second number to it, and get an answer. For example, 1 + 2 = 3.
There are four rules that need to be followed when adding two binary numbers. These are:
0+0=0
1+0=1
1 + 1 = 10 (binary for decimal 2)
1 + 1 + 1 = 11 (binary for decimal 3)
Example - adding 01 + 10
1 + 1 = 0, carry 1
1+0+0=1
0+1=1
11 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
Example - adding 01010011 + 01110110
1+0=1
1 + 1 = 0, carry 1
1 + 0 + 1 = 0, carry 1
1+0+0=1
1 + 1 = 0, carry 1
1 + 0 + 1 = 0, carry 1
1 + 1 + 1 = 1, carry 1
1+0+0=1
Result in binary - 11001001 (which is decimal 201). You can check your answers by
converting each binary number into decimal and checking your addition. In this example,
01010011 is 83 in decimal and 01110110 is 118 in decimal. So, 83 + 118 is 201.
Overflow
Overflow occurs when the result of a calculation requires more bits - place values - than are
in the available range.
For example, when using eight bits, the largest number that can be recorded is 11111111
(decimal 255). When adding together two eight-bit numbers, a situation may occur when
the result requires more than eight bits to hold it. For example, adding the binary numbers
11111110 (decimal 254) and 00000010 (decimal 2) would give:
The result is actually 10000000 (decimal 256), which requires nine bits. However, as only
eight bits are available to hold the number, the result would be 00000000 (decimal 0).
As you can see, overflow can have serious consequences for the validity of calculations.
12 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
Lesson 6 Binary addition Pt.1
13 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
LESSON 7: BINARY ADDITION pt2
TASK 1:
14 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
15 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
TASK 2:
16 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
LESSON 9: BINARY ADDITION PT.4
TASK 1:
17 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
TASK 2:
1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
11)
12)
13)
14)
15)
16)
18 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
The general idea is that for every Hex character you have, you will need one 4bit binary system to convert it into
binary code. To convert this example (1A) you will need to split the ‘1’ and the ‘A’ apart and put them into their own
individual 4bit binary systems, as shown below.
Hex (1) holds the same value as the denary/decimal number 1 and is much the same in binary (0001) (This is how
binary (1) is represented in a 4bit system). Following the same pattern: As you can see from the table above the
example, Hex (A) is equal to the number 10 in denary/decimal and is also equal to 1010 in binary code.
In order to get the full binary code for Hex (1A), you now simply need to combine the two 4bit binary systems as you
see them above. The example below shows you the result:
The two 4bit binary systems have now been combined and one 8bit binary system has now been created as a result.
The key difference between the two 4bit binary systems and the 8bit system, is that the numbers represented in
denary now increment by the power of 2, (like in a normal binary to denary conversion table). However, the results
of ‘1’ and ‘A’ follow the same pattern in the 8bit binary system as they did in the two 4bit binary systems. Therefore,
you have the accurate binary code for Hex (1A). In theory, you can now work out the denary from the 8bit binary
system as well.
Converting Hexadecimal to binary and then to denary, try the questions found over the page.
19 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
Q1) 1B
Q2) AA
Q3) 1F
Q4) 2A
Q5) BB
Q6) 2E
Q7) 3A
Q8) CC
Q9) 3D
Q10) 4A
20 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
Q11) DD
Q12) 4C
Q13) 5A
Q14) EE
Q15) 5B
Q16) 6A
Q17) FF
Q18) 7F
Q19) A0
21 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
Q20) 8A
22 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
LESSON 11: HEXADECIMALS CONTINUED
TASK 1:
TASK 2:
23 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
LESSON 12: EXAM BASED QUESTIONS
1) A car has many types of embedded systems.
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
(ii) The car displays speed limits in denary. Convert the 8-bit binary number 0010 0011 to denary.
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
____________________________________________________________________________________________
Complete the table to show the result of 0010 0011 + 0100 1010
24 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
ANSWERS:
LESSON 1
TASK 1:
1) Binary is a number system that only uses two digits: 1 and 0. All information that is
processed by a computer is in the form of a sequence of 1s and 0s. Therefore, all data that
we want a computer to process needs to be converted into binary.
2) Denary
3) 0000011
4) Base 2
TASK 2:
In computing, an overflow error can occur when a calculation is run but the computer is
unable to store the answer correctly. All computers have a predefined range of values
they can represent or store. Overflow errors occur when the execution of a set of
instructions return a value outside of this range.
LESSON 2
TASK 1:
TASK 2:
25 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
LESSON 3
26 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
TASK 1:
TASK 2:
27 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
28 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
29 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
TASK 1:
30 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
31 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
TASK 2:
LESSON 5
TASK 1:
32 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
TASK 2:
33 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
Covert all answers from Task 1 into Denary:
1) 251
2) 307
3)341
4)401
5)448
6)493
7)318
8)247
9)277
10)169
11)247
12)253
13)325
14)388
15)378
16)414
LESSON 6
34 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
TASK 2:
35 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
LESSON 9
TASK 1:
36 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
TASK 2:
37 | P a g e
YEAR 7 CS BOOKLET – Spr 2.1
KEY WORDS –
Binary
Bit
The smallest unit of data – a bit can take the value of ‘0’or ‘1’, alternatively expressed as ‘false’ or
‘true’.
Byte
The smallest addressable unit of data in a computer. Usually 8 bits.
Gigabyte (GB)
1024 megabytes
Kilobyte (kB)
1024 bytes
Megabyte (MB)
1024 kilobytes
Nibble
Half a byte
Terabyte (TB)
1024 gigabytes
Binary
Numbers expressed in base 2.
Decimal (denary)
Numbers expressed in base 10.
Hexadecimal
Numbers expressed in base 16.
Overflow
An error caused by attempting to store a number that is too large for the number of bits available.
38 | P a g e