Paper 1
Computer systems
Chapter 1
Lecture 02
Data representation
1.1 Number Systems
Computers contain millions and millions of tiny ‘switches’, which must be
in the ON or OFF position, they can be represented by the binary
system. A switch in the ON position is represented by 1; a switch in the
OFF position is represented by 0
1.Binary number system (Base 2)
(0110)2
● Used inside computers.
● Has only two digits:
0 and 1
● Each digit is called a bit.
4 bits = 1 nibble
8 bits= 1 byte memory units
Computers use binary because all hardware works with ON (1) and OFF (0)
electrical signal.
2^n always
,2^8 = 256
2^9= 512
2^10= 1024
2^11=2048
Binary number Decimal
No
1024 512 256 128 64 32 16 8 4 2 1
0 1 1
1 0 2
1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
Decimal no binary number
, 0 00
1 01
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
2.Denary/decimal number system(base 10)
The normal number system we humans use daily.
Has 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Each place represents a power of 10.
427 = (4 × 100) + (2 × 10) + (7 × 1)
3.Hexadecimals(base 16)
(AB)16
Hexa means six and decimal means 10
, Used by computers to make binary numbers shorter and easier to read.
Try ipconfig command in your command prompt of computer
Has 16 symbols:
0–9 → represent 0 to 9
0
1
23
9
A–F → represent 10 to 15
A=10
B=11 Naming convention
C=12
D=13
E=14
F=15
G=16
H=17
Hexadecimal 1A = (1 × 16) + (10) = 26 in Denary
We often use hexadecimal system for:
● Memory addresses
● error codes
● MAC addresses
● IPv6 addresses
● HTML colour codes (e.g., #FF0000 for red)
● Machine instructions
Conversions
1.Denary to binary:
20
Computer systems
Chapter 1
Lecture 02
Data representation
1.1 Number Systems
Computers contain millions and millions of tiny ‘switches’, which must be
in the ON or OFF position, they can be represented by the binary
system. A switch in the ON position is represented by 1; a switch in the
OFF position is represented by 0
1.Binary number system (Base 2)
(0110)2
● Used inside computers.
● Has only two digits:
0 and 1
● Each digit is called a bit.
4 bits = 1 nibble
8 bits= 1 byte memory units
Computers use binary because all hardware works with ON (1) and OFF (0)
electrical signal.
2^n always
,2^8 = 256
2^9= 512
2^10= 1024
2^11=2048
Binary number Decimal
No
1024 512 256 128 64 32 16 8 4 2 1
0 1 1
1 0 2
1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
Decimal no binary number
, 0 00
1 01
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
2.Denary/decimal number system(base 10)
The normal number system we humans use daily.
Has 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Each place represents a power of 10.
427 = (4 × 100) + (2 × 10) + (7 × 1)
3.Hexadecimals(base 16)
(AB)16
Hexa means six and decimal means 10
, Used by computers to make binary numbers shorter and easier to read.
Try ipconfig command in your command prompt of computer
Has 16 symbols:
0–9 → represent 0 to 9
0
1
23
9
A–F → represent 10 to 15
A=10
B=11 Naming convention
C=12
D=13
E=14
F=15
G=16
H=17
Hexadecimal 1A = (1 × 16) + (10) = 26 in Denary
We often use hexadecimal system for:
● Memory addresses
● error codes
● MAC addresses
● IPv6 addresses
● HTML colour codes (e.g., #FF0000 for red)
● Machine instructions
Conversions
1.Denary to binary:
20