1.1.1 Information Representation: Unit 1: Theory Fundamentals
1.1.1 Information Representation: Unit 1: Theory Fundamentals
Write in books
1.1.1 Binary systems
• The Binary number system:
Many electronic components are bistable – they
can be in either 2 states (such as on/off).
These two possible states are denoted by 0 and 1.
This is also the symbols used for the binary
number system. Binary digits are called bits for
short.
This allows us to perform calculations using binary
arithmetic or base 2.
Write in books
3
Units
U, 2, 4, 8, 16, 32, 64, 128
Don’t write in books
4
1.1.1 Hexadecimal
Notice that hexadecimal numbers
are represented by four binary
numbers or four bits! (Nibble)
Note that: 8 bits usually = one byte
The hexadecimal system is useful
because it can represent
every byte (8 bits) as two
consecutive hexadecimal digits.
E 28510 E DAD16
F 91110 F CAB16
Write in books
6
C Answers to Cquestions
0001 0101 0101 = 341 0001 0010 1100 12C = 300
2 16 10
D 59Remove
= 0011 1011 box
D to
2730seeAAA = 1010 1010 1010
10 16 2
Write in books
7
Write in books
8
Write in books
9
Write in books
10
0+0=0 0-0=0
0+1=1 1-0=1
1+0=1 1-1=0
1 + 1 = 0, with a carry of 1 0 - 1 = 1 with a borrow of 1 from
the next column
1 + 1 + 1 = 1 with a carry of 1
Write in books
11
Write in books
12
Write in books
13
1.1.1 Binary:
Subtracting
Rules for subtracting
0-0=0
1-0=1
1-1=0 See videos
0 - 1 = 1 with a borrow of 1 from
the next column
Because it is base 2
you borrow 2 every
time but it’s easier to
display it as two 1s
14
Write in books
15
A 10100 A 10
B 1010000 B 11
C
Answers
110101010
to questions
C 0111
D
Remove
10010.0111
box
D
to see 0101100
E 1110011 E 1110111
F 11111.000 F 10.010
Write in books
18
To 0 1 1 1 1 1 1 1 (+127)
Write in books
19
Write in books
20
• The bit in brackets is carried over from the -16 column. This
bit is called the overflow bit. We ignore this overflow bit so
15 – 8 = 00111 in two’s compliment,
when converted back to denary this is 7
Write in books
21
1.1.1 Binary: Two’s Compliment • As you can see below the two
• Calculate 31 – 17 using two’s bit patterns are different
compliment! because different bit lengths
have been used. So it is essential
that you know the bit length
before you answer the question.
The usual bit length is eight.
Answers to questions
Remove box to see
Hints
A positive number always has ZERO as the MSB (most significant bit)
A negative number always has a ONE as the MSB
An even number always has a ZERO as the LSB (least significant bit)
An odd number always has a ONE as the LSB
Write in books
23
1 4
5
2
Write in books
26
Write in books
27
Write in books
28
Write in books
29
Write in books
31
Write in books
32
Write in books