1 - The Computing Zone

advertisement
Units
Representation of Data in
Computer Systems
Activity 1
5 minutes to research the following:
Representation of Data in Computer Systems
Learning
Objectives:
Introduction
Units:
• In this unit we will understand the
importance and versatility of binary
numbers and how binary is used to store
data in computer systems.
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
Numbers
Text
Images
Sound
Instructions
…are all stored in binary and we will
understand how this is done!
Representation of Data in Computer Systems
Learning
Objectives:
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
How can images, text & sound be made
up of binary numbers?
It is fairly easy to understand how numbers
are stored in binary format in computer
systems.
But what about text, images and sound?
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
The key thing to remember is that text,
images and sound are all converted into
numbers before they are stored in
computers in binary form.
Representation of Data in Computer Systems
Learning
Objectives:
Why Binary?
Units:
Computers are made up of switches.
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
They are either on (1) or off (0).
Computers therefore cannot physically
represent any more than 2 numbers (0 and
1)
So any type of data that the computer
deals with HAS to be converted into a
binary number for the computer to process
it.
Representation of Data in Computer Systems
Learning
Objectives:
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
So to recap…
What are the different types of data
can be represented by computer
systems?
Numbers, text, images (inc moving) and sound
What has to happen to these types of
data before they can be processed by
the computer?
Converted to numbers
Why can’t computer systems deal with
numbers, text, images and sound in the
form they are naturally in?
Computers can only handle 0’s and 1’s
What is Binary?
Learning
Objectives:
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
So What is Binary?
Because humans have 10 fingers, we count
using a denary number system (base 10):
We count to ten…
Then we record it by placing a 1 in the 10s
column…
Tens
2
1
Ones
57
6
9
4
8
5
6
4
8
0
39
2
1
7
3
2
1
…and when we get to 100, we make a record
of it by placing a 1 in the 100s column…and so
on!
What is Binary?
Learning
Objectives:
So What is Binary?
Units:
This is how we (like computers) count in
binary
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
We count to 2…
Then we record it by placing a 1 in the 2s
column…
Sixteens
Eights
Fours
Twos
Ones
1
10
01
1
0
1
010
0
1
01
…and when we get to 2 sets of 2s, we
make a record of it by placing a 1 in the 4s
column…and so on!
…and so on!
Units of a
Single Binary
Number
Representation of Data in Computer Systems
Learning
Objectives:
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
Units of a single binary number:
In the binary system we have some special
names that we give binary numbers of
different length.
The basic unit is 0 or 1.
This is a binary digit….also
known as a
bit
A bit can store one of 2 numbers (0 and 1)
Representation of Data in Computer Systems
Learning
Objectives:
Units of a single binary number:
Units:
A group of 8 bits is known as a…
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
128
64
32
16
8
4
2
1
1
0
0
1
1
1
0
1
Byte
A byte can store one of 256 numbers
Representation of Data in Computer Systems
Learning
Objectives:
Units of a single binary number:
Why do computer scientists use bytes?
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
Traditional CPUs had registers which could hold a
maximum of 8 bits. So each piece of data that
came into the CPU would be 8 bits in length
(representing a number from 0 to 255).
1 1 0 0 1 0 1 0
1 0 0 1 1 0 0 1
1 0 1 1 1 0 0 1
0 0 1 1 1 0 0 0
A byte therefore became the standard size for a
binary number… it can of course be greater but
CPUs have set sized registers limiting the size of
binary numbers that can be handled by its
registers.
Representation of Data in Computer Systems
Learning
Objectives:
Units of a single binary number:
Units:
A group of 4 bits (1/2 a byte) is known
as a…
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
8
4
2
1
1
1
0
1
nibble
Units of Groups of
Binary Numbers
Representation of Data in Computer Systems
Learning
Objectives:
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Units of sets/groups of binary numbers
Just like the traditional number system,
binary also use the word kilo to
represent 1000. (eg: kilogram = 1000grams)
But, 1000 is not a very neat binary
number, so we go to its closest ‘neat’
value…
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
210 = 2x2x2x2x2x2x2x2x2x2 =
1024
210
29
28
27
26
25
24
23
22
21
20
1024
512
256
128
64
32
16
8
4
2
1
Representation of Data in Computer Systems
Learning
Objectives:
Units of sets/groups of binary numbers
Units:
So 1024 is at the heart of the way we
group larger binary numbers…
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
8 bits
1 byte
8 (0’s / 1’s)
1024 bytes
1 kilobyte
Roughly 1000 bytes
8192 (0’s / 1’s)
1024 kilobytes
1 megabyte
Roughly 1 million bytes
8,388,608 (0’s / 1’s)
1024 megabytes
1 gigabyte
Roughly 1 billion bytes
8,589,934,592 (0’s / 1’s)
1024 gigabytes
1 terabyte
Roughly 1 trillion bytes
8,796,093,022,208 (0’s / 1’s)
Representation of Data in Computer Systems
Learning
Objectives:
Units of sets/groups of binary numbers
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
Few bytes
Few kilobytes (kb)
A few
binary
numbers
A few
thousand
binary
numbers
A few
million
binary
numbers
Few Megabytes (mb)
Few Gigabytes (gb)
A few
billion
binary
numbers
Representation of Data in Computer Systems
Learning
Objectives:
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
Units of Single Binary Numbers
On your whiteboard:
Display a bit
Display a byte
Display a nibble
Representation of Data in Computer Systems
Learning
Objectives:
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
Units of sets of Binary Numbers
On your whiteboard:
How many bytes are in a Kilobyte?
1024 (roughly 1000)
Roughly how many bytes are in a
Gigabyte?
Roughly 1 billion
What would be a sensible unit for the size
of a music file?
Megabytes
What would be a sensible unit for the size
of a persons surname?
Bytes
Representing
Numbers
Representation of Data in Computer Systems
Learning
Objectives:
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
Converting Binary Numbers
In your exam you will be expected to
be able to convert a denary number
(the numbers humans work with (base
10) into binary…
128
64
32
16
8
4
2
1
1 0 0 1 1 1 0 1
157
…and back again.
Representation of Data in Computer Systems
Learning
Objectives:
Converting from Binary to Denary (easy)
Units:
If you are given a binary number which is to be
converted into denary do the following:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
1.
Above each bit, write the value of that bit.
128
64
32
16
8
4
2
1
1 0 0 0 0 1 0 1
2. Then simply add the values where there is a 1
underneath, together.
1
2
8
4
1
1
3
1
3
Representation of Data in Computer Systems
Learning
Objectives:
Units:
a) Define the term bit,
nibble, byte, kilobyte,
megabyte, gigabyte,
terabyte.
b) Understand that data
needs to be converted
into binary format to be
processed by the
computer.
Numbers:
a) Convert positive
denary numbers (0-255)
into 8-bit binary numbers
and vice versa.
Converting from Binary to Denary (easy)
128
64
32
16
8
4
2
1
1
1
0
1
0
0
0
0
1
0
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
0
0
1
1
0
0
Tasks
(10000 mins)
• Create an A4 sheet outlining the
different units that are given to
– Single binary numbers
– Sets of binary numbers
Download