L2 - Bits, Bytes and Digital Information
L2 - Bits, Bytes and Digital Information
digital information
Today’s
lecture
Understand the difference between
analogue and digital information
Convert between decimal numbers and
binary numbers.
Convert between Decimal and Octal
numbers
Convert between Decimal and Hexa-
decimal Numbers
Analogue vs digital
information
Information in the real world is
continuous
Continuous signal
Weigh
t
shown
R
e
a
l
W
e
iReal Weight
g
h
Encoding
information
Real world information is stored by a
computer using numbers
Visual information
11111111111111111111111
01111111111111111111111
00001111111111111111111
00000011111111111111111
00000000011111111111111
44444000001111111111111
75444000000011111111111
55554401000000111111111
33367544000000011111111
22283554444000000111111
99928357544000000011111
99999233657504000001111
99999983666554400000011
99999928338674400000001
Image Pixels
1. Give each pixel colour a number.
2. Let the computer draw the numbers as
coloured pixels (eg. black = 0).
Encoding
information
Sound
information
Sound
Wavefor Samples
m
1. Give each sample a number (height of
green box).
2. Let the computer move the
loudspeaker membrane according to
the samples.
Numbers and
Computing
Numbers are used to represent all
information manipulated by a computer.
Positional notation:
— Describes how numbers are written.
∗ 100
600 + 50 + 7 = 657
∗ 100
638
3rd dial from right: 102
—
—
— etc.
Exercis
esfollowing two questions relate to dials
The
that have 10 different states, as
discussed in the previous slide.
00 10
0
000 0
1 01 10
001 11
0
10 11
010 1
Exercis
es
How many different values can we
represent with a byte?
∗ 20
4+2+0=6
1 ∗ 24 + 0 ∗ 23 + 1 ∗ 22 + 1 ∗ 21 +
10110
0 ∗ 20
16 + 0 + 4 + 2 + 0 = 22
Converting from decimal to
binary
35 106
2 106
2 35
2 53 0
2 17 1
2 26 1
2 8 1
Read the 2 13 0
2 4 0 Read the
remainders from 2 6 1 remainders from
2 2 0 the bottom up. 2 3 0 the bottom up.
2 1 0
2 1 1
0 1
0 1
1
Prefix
none
Symbol Decimal
20 none 1