SlideShare a Scribd company logo
1 of 42
1
Chapter Two
NUMBER SYSTEM AND
REPRESENTATION
2.2 Number System
2.2.1 Binary
2.2.2 Hexadecimal
2.2.3 Conversion Between Binary and
Hexadecimal
Define Number
System
● A set of numerals for representing
numbers
Decimal Numbers (base 10)
Binary Numbers (base 2)
Hexadecimal Numbers (base 16)
Page 260
Figure 5-2
2
Discovering Computers : Chapter 5
Decimal Numbers
● Consists of numbers 0-9
● Decimal digits are joined together to form
longer decimal numbers
● Example: 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,
12,………
● also known as the base 10 numbering system
3
6 1 5
6 x 10^2 1 x 10^1 5 x 10^0
6 x 100 1 x 10 5 x 1
600 + 10 + 5 = 615
At the end of this topic, students
should be able to:
represent data in binary forma)
1
Chapter Two
NUMBER SYSTEM AND
REPRESENTATION
2.2.1 Binary
Binary Numbers
● Machine recognises two states: 0 (off) and 1
(on)
● Binary number represents numeric values
using two symbols, 0 and 1
● Eg : 111000, 101 111 111
2
Comparison Between Decimal Number
and Binary Number
3
DECIMAL BINARY
0 0
1 1
2 10
3 11
4 100
5 101
6 110
DECIMAL BINARY
7 111
8 1 000
9 1 001
10 1 010
11 1 011
. .
40 101 000
. .
At the end of this topic, students
should be able to:
represent data in hexadecimal forma)
1
Chapter Two
NUMBER SYSTEM AND
REPRESENTATION
2.2.2 Hexadecimal
Hexadecimal Numbers
● Uses 16 symbols: 0,1,2, 3, 4, 5, 6, 7, 8, 9, A, B,
C, D, E and F.
● It can represent binary values in compact
form.
● 9B416
is example of hexadecimal numbers.
2
Comparison Between Decimal Number
and Hexadecimal Number
3
DECIMAL HEXADECIMAL
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
DECIMAL HEXADECIMAL
10 A
11 B
12 C
13 D
14 E
15 F
16 10
17 11
20 14
35 23
4
Decimal Hexadecimal Binary
0 0 0
1 1 1
2 2 10
3 3 11
4 4 100
5 5 101
6 6 110
7 7 111
8 8 1000
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111
Comparison Between Number System
At the end of this topic, students
should be able to:
a. convert from binary to hexadecimal
b. convert from hexadecimal to binary
1
Chapter Two
NUMBER SYSTEM AND
REPRESENTATION
2.2.3 Conversion Between Binary and Hexadecimal
Conversion Between Number System
● Decimal to Binary
● Binary to Decimal
● Decimal to Hexadecimal
● Hexadecimal to Decimal
● Binary to Hexadecimal
● Hexadecimal to Binary
2
CONVERSION
Decimal to Binary conversion
3
Binary
number
2
2 ---- 0
---- 1
2
2
---- 1
---- 0
22
11
5
2
1
0 ---- 1
Hence, 22 = 10110 2
Eg 1: Convert the number 22 to the binary
number system. Solution : 22
=
2
2
Write from bottom to
top → left to right
Decimal to binary conversion
4
Eg 2: Convert the number 40 to the
binarynumber system. Solution : 40 =
2
2
2
2
2
2
2
40
20
10
5
2
1
0
---- 0
---- 0
---- 0
---- 1
---- 0
---- 1
Binary
number
Hence, 40 = 101000 2
Write from bottom to
top → left to right
Decimal to binary conversion
5
2
2
2
2
2
18
9
4
2
1
0
---- 0
---- 1
---- 0
---- 0
---- 1
Binary
number
Hence, 18 = 100102
Eg 3:Express 18 in binary number form
Solution 18 = 2
Write from bottom to
top → left to right
Decimal to binary conversion
6
CONVERSION
Binary to Decimal conversion
7
● In binary number, the column weights
(again from right to left) are as follows:
● Eg : convert 1011 2 to decimal number
Binary to Decimal conversion
1 0 1 1
1 x (2^3) 0 x (2^2) 1 x (2^1) 1 x (2^0)
1 x 8 0 x 4 1 x 2 1 x 1 Decimal number
8 0 2 1
8+0+2+1=1110
Binary to decimal conversion
CONVERSION
Eg 1: Convert the number 10112 to the
decimal
8
Hence, 10110 2 = 22
Eg 1: Convert the binary number 10110 2 to
decimal number
Solution:
1 0 1 1 0
1 x 2^4 0 x 2^3 1 x 2^2 1 x 2^1 0 x 2^0
2210
1 x 16 0 x 8 1 x 4 1 x 2 0 x 1
16 0 4 2 0
16 + 0 + 4 + 2 + 0 =
Binary to decimal conversion
CONVERSION
Eg 2: Convert the number 101102 to the
decimal
9
Eg 2 :Convert the binary number 1011100 2
to decimal number
Solution:
Hence, 1 011 100 2 = 92
1 0 1 1 1 0 0
1 x 2^6 0 x 2^5 1 x 2^4 1 x 2^3 1 x 2^2 0 x 2^1 0 x 2^0
9210
1 0 1 1 1 0 0
1 x 64 0 x 32 1 x 16 1 x 8 1 x 4 0 x 2 0 x 1
64 + 0 + 16 + 8 + 4 + 0 + 0
=
Binary to decimal conversion
CONVERSION
Eg 3: Convert the number 10111002 to the
decimal
10
CONVERSION
Decimal to Hexadecimal
conversion
11
16
16
16
1341
83
5
0
---- 3
---- 5
Eg 1: Convert the decimal number 1341 to
hexadecimal number
Hence,1341 = 53D16
Decimal to hex conversion
Hex Number
Write from bottom to
top → left to right
---- 13 = D
12
Eg 2 : Convert the decimal number 860 to
hexadecimal number
16
16
16
860
53
3
0
---- 12 = C
---- 5
---- 3
Hence, 860 = 35C16
Hex Number
Decimal to hex conversion
Write from bottom to
top → left to right
13
16
16
16
2020
126
7
0
---- 4
---- 14 = E
---- 7
Eg 3 : Convert the decimal number 2020 to
hexadecimal number
Hex Number
Decimal to hex conversion
Hence, 2020 = 7E416
Write from bottom to
top → left to right
14
CONVERSION
Hexadecimal to Decimal
conversion
15
to decimal number● Convert
AFB216
Solution:
Hence, AFB216 =
44978
Eg 1 : Convert the hex number, AFB216
to decimal number
A F B 2
A x 16^3 F x 16^2 B x 16^1 2 x 16^0
4497810
10 x 4096 15 x 256 11 x 16 2 x 1
40960 + 3840 + 176 + 2 =
hex to decimal conversion
CONVERSION
Eg 1: Convert the number AFB16 to the
decimal
16
to decimal number● Convert
BA816
Solution:
Hence, BA816 =
2984
Eg 2 : Convert the hex number, BA816
to decimal number
B A 8
B x 6^2 A x 16^1 8 x16^0
298410
11 x 256 10 x 16 8 x 1
2816 + 160 + 8 =
hex to decimal conversion
CONVERSION
Eg 2: Convert the number BA816 to the
decimal
17
to decimal number● Convert AFFA16
Solution:
Hence, AFFA16 =
45050
Eg 3 : Convert the hex number, AFFA16
to decimal number
A F F A
A x 16^3 F x 16^2 F x 16^1 A x16^0
4505010
10 x 4096 15 x 256 15 x16 10 x
1
40960 + 3840 + 240 + 10 =
hex to decimal conversion
CONVERSION
Eg 3: Convert the number AFFA16 to the
decimal
18
CONVERSION
Binary to Hexadecimal
conversion
19
Binary to Hexadecimal conversion
● There are two ways on how to convert
the
binary to hexadecimal number.
● 1st way : Decimal
Hexadecimal
○ Binary
○ 2nd way :
○ Binary Hexadecimal
binary to hex conversion 20
Eg. 1: Convert the binary number 110102 to
hexadecimal 1st way
○ Binary Decimal
26
1
16
16
0
---- 10 = A
---- 1
Decimal Hexadecimal
Hence, 11010 2 = 1A16
1 1 0 1 0
1 x 2^4 1 x 2^3 0 x 2^2 1 x 2^1 0 x 2^0
26
1 x16 1 x8 0 x 4 1 x 2 0 x 1
16 + 8 + 0 + 2 + 0 =
Eg. 1: Convert the binary number 110102 to
hexadecimal 1st way
21
● Step 1: divide the given binary digit into 4 digit per
group from right to left.
1 1 0 1 0
● Step 2: Using 8421 table,
1 1 0 1 0
1
= 1
8 4
2
1
8 + 2
= 10
= A
8 4 2 1
Hence, 11010 2 =
1A16
Eg. 1: Convert the binary number 110102 to
hexadecimal 2nd way
22
Binary Decimal
binary to hex conversion
18
1
0
---- 2
---- 1
Decimal
16
16
Hexadecimal
Hence, 100102 = 1216
Hex number
Eg.2 :Convert the binary number 100102 to
hexadecimal 1st way
1 0 0 1 0
1 x 2^4 0 x 2^3 0 x 2^2 1 x 2^1 0 x 2^0
18
1 x 16 0 x 8 0 x 4 0 x 2 0 x 1
16 + 0 + 0 + 2 + 0 =
Eg. 2: Convert the binary number 100102 to
hexadecimal 1st way
23
Eg.2 :Convert the binary number 100102 to
hexadecimal 2nd way
● Step 1: divide the given binary digit into 4 digit per
group from right to left.
1 0 0 1 0
● Step 2: Using 8421 table,
1 0 0 1 0
1
= 1
8 4
2
1
2
= 2
8 4 2 1
Hence, 11010 2 =
1216
24
CONVERSION
Hexadecimal to Binary
conversion
25
Hexadecimal to Binary conversion
● There are two ways on how to convert
the
hexadecimal to binary number.
● 1st way : Decimal
Binary
○ Hexadecimal
○ 2nd way :
○ Hexadecimal Binary
binary to hex conversion 26
Eg 1: Convert the hexadecimal number
3FD to binary number 1st way
Hexadecimal Decimal
16^2 16^1 16^0
1021
3 F D
256 x3 16 x15 1 x 13
768 + 240 + 13 =
hex to binary conversion
Eg. 1: Convert the hexadecimal number
3FD16 to binary number 1st way
Hexadecimal Decimal
27
Binary number
De
2
2
2
2
1021
510 ---- 1
255 ---- 0
127 ---- 1
2 63 ---- 1
2 31 ---- 1
2 15 ---- 1
2 7 ---- 1
2 3 ---- 1
2 1 ---- 1 Hence, 3FD16 = 11111111012
0 ---- 1
cimal Binary
hex to binary conversion
Eg. 1: Convert the hexadecimal number
3FD16 to binary number 1st way
28
Eg 1: Convert the hexadecimal number
3FD to binary number 2nd way
Hence, 3FD16 = 11111111012
=8+4+1
= 13
=8+4+2+1
= 15
=2+1
= 3
3 F = 15 D = 13
3 15 13
8 4 2 1 8 4 2 1 8 4 2 1
0 0 1 1 1 1 1 1 1 1 0 1
Eg. 1: Convert the hexadecimal number
3FD16 to binary number 2nd way
hex to binary conversion
29
Eg 2: Convert the hexadecimal number 1A2
to binary number 1st way
hex to binary conversion
Hexadecimal Decimal Decimal Binary
2
2
2
2
2
2
2
2
2
2
---- 0
---- 1
---- 0
---- 0
---- 0
---- 1
---- 0
---- 1
---- 1
Hence, 1A216 = 1101000102
1 A 2
1 x 16^2 A x 16^1 2 x 16^0
418
1 x 256 10 x 16 2 x 1
256 + 160 + 2 =
418
209
104
52
26
13
6
3
1
0
Eg. 2: Convert the hexadecimal number
1A216 to binary number 1st way
DecimalHexadecimal Decimal Binary
hex to binary conversion
30
Eg 2: Convert the hexadecimal number
1A2 to binary number 2nd way
=2=8+2
= 10
=1
Hence, 1A216 = 1101000102
1 A 2
1 10 2
8 4 2 1 8 4 2 1 8 4 2 1
0 0 0 1 1 0 1 0 0 0 1 0
= 2= 8 + 2
= 10
= 1
Eg. 2: Convert the hexadecimal number
1A216 to binary number 2nd way
hex to binary conversion
31
UPS 2015/2016
Q: Given the Internet Protocol address of a
printer as 192.0.0.2. Convert the address to
hexadecimal number [2 marks]
A: C0.0.0.2
32

More Related Content

What's hot (17)

Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systems
 
Math unit7 number system and bases
Math unit7 number system and basesMath unit7 number system and bases
Math unit7 number system and bases
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notes
 
Binary number systems multiplication
Binary number systems multiplicationBinary number systems multiplication
Binary number systems multiplication
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Bolum1cozumler
Bolum1cozumlerBolum1cozumler
Bolum1cozumler
 
Number System
Number SystemNumber System
Number System
 
Number system
Number systemNumber system
Number system
 
PPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMPPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEM
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Number systems tutorial
Number systems tutorialNumber systems tutorial
Number systems tutorial
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 
Naskah Murid Modul 1 Number Bases
Naskah Murid Modul 1 Number BasesNaskah Murid Modul 1 Number Bases
Naskah Murid Modul 1 Number Bases
 
Numbersystemcont
NumbersystemcontNumbersystemcont
Numbersystemcont
 
Digital Electronics and Computer Language
Digital Electronics and Computer Language Digital Electronics and Computer Language
Digital Electronics and Computer Language
 
L2 number
L2 numberL2 number
L2 number
 
Number system
Number systemNumber system
Number system
 

Similar to PST SC015 Chapter 2 Computer System 2017/2018

PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)Fizaril Amzari Omar
 
micro tut1.pptx
micro tut1.pptxmicro tut1.pptx
micro tut1.pptxsdwqt4tg
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptxAminaZahid16
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.pptRabiaAsif31
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptxamudhak10
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptxamudhak10
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.pptssuser52a19e
 
Review on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and HexadecimalReview on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and HexadecimalUtkirjonUbaydullaev1
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.pptRAJKUMARP63
 
Miscellaneous examples of binary , quinary and octonary numbers (2)
Miscellaneous examples of binary , quinary and octonary numbers (2)Miscellaneous examples of binary , quinary and octonary numbers (2)
Miscellaneous examples of binary , quinary and octonary numbers (2)Nadeem Uddin
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptxsulekhasaxena2
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital ElectronicsJanki Shah
 
Binary octal
Binary octalBinary octal
Binary octaldrdipo4
 

Similar to PST SC015 Chapter 2 Computer System 2017/2018 (20)

PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)
 
micro tut1.pptx
micro tut1.pptxmicro tut1.pptx
micro tut1.pptx
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
binary-numbers.ppt
binary-numbers.pptbinary-numbers.ppt
binary-numbers.ppt
 
Review on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and HexadecimalReview on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and Hexadecimal
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
ch2.pdf
ch2.pdfch2.pdf
ch2.pdf
 
Miscellaneous examples of binary , quinary and octonary numbers (2)
Miscellaneous examples of binary , quinary and octonary numbers (2)Miscellaneous examples of binary , quinary and octonary numbers (2)
Miscellaneous examples of binary , quinary and octonary numbers (2)
 
conversion.ppt
conversion.pptconversion.ppt
conversion.ppt
 
lecture3_dec_bin_1.ppt
lecture3_dec_bin_1.pptlecture3_dec_bin_1.ppt
lecture3_dec_bin_1.ppt
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Chapter02.pdf
Chapter02.pdfChapter02.pdf
Chapter02.pdf
 
Binary octal
Binary octalBinary octal
Binary octal
 

More from Fizaril Amzari Omar

Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018Fizaril Amzari Omar
 
Chapter 5 Multimedia SC025 2017/2018
Chapter 5 Multimedia SC025 2017/2018Chapter 5 Multimedia SC025 2017/2018
Chapter 5 Multimedia SC025 2017/2018Fizaril Amzari Omar
 
PDT DC015 Chapter 2 Computer System 2017/2018 (m)
PDT DC015 Chapter 2 Computer System 2017/2018 (m)PDT DC015 Chapter 2 Computer System 2017/2018 (m)
PDT DC015 Chapter 2 Computer System 2017/2018 (m)Fizaril Amzari Omar
 
PDT DC015 Chapter 2 Computer System 2017/2018 (k)
PDT DC015 Chapter 2 Computer System 2017/2018 (k)PDT DC015 Chapter 2 Computer System 2017/2018 (k)
PDT DC015 Chapter 2 Computer System 2017/2018 (k)Fizaril Amzari Omar
 
PDT DC015 Chapter 2 Computer System 2017/2018 (j)
PDT DC015 Chapter 2 Computer System 2017/2018 (j)PDT DC015 Chapter 2 Computer System 2017/2018 (j)
PDT DC015 Chapter 2 Computer System 2017/2018 (j)Fizaril Amzari Omar
 
PDT DC015 Chapter 2 Computer System 2017/2018 (i)
PDT DC015 Chapter 2 Computer System 2017/2018 (i)PDT DC015 Chapter 2 Computer System 2017/2018 (i)
PDT DC015 Chapter 2 Computer System 2017/2018 (i)Fizaril Amzari Omar
 
PDT DC015 Chapter 2 Computer System 2017/2018 (g)
PDT DC015 Chapter 2 Computer System 2017/2018 (g)PDT DC015 Chapter 2 Computer System 2017/2018 (g)
PDT DC015 Chapter 2 Computer System 2017/2018 (g)Fizaril Amzari Omar
 
PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)Fizaril Amzari Omar
 
PDT DC015 Chapter 2 Computer System 2017/2018 (e)
PDT DC015 Chapter 2 Computer System 2017/2018 (e)PDT DC015 Chapter 2 Computer System 2017/2018 (e)
PDT DC015 Chapter 2 Computer System 2017/2018 (e)Fizaril Amzari Omar
 
PDT DC015 Chapter 2 System Concept 2017/2018 (a)
PDT DC015 Chapter 2 System Concept 2017/2018 (a)PDT DC015 Chapter 2 System Concept 2017/2018 (a)
PDT DC015 Chapter 2 System Concept 2017/2018 (a)Fizaril Amzari Omar
 
PST SC015 Chapter 4 Comp. Ethics and Security 2017/2018
PST SC015 Chapter 4 Comp. Ethics and Security 2017/2018PST SC015 Chapter 4 Comp. Ethics and Security 2017/2018
PST SC015 Chapter 4 Comp. Ethics and Security 2017/2018Fizaril Amzari Omar
 
PST SC015 Chapter 3 Internet Technology (V) 2017/2018
PST SC015 Chapter 3 Internet Technology (V)  2017/2018PST SC015 Chapter 3 Internet Technology (V)  2017/2018
PST SC015 Chapter 3 Internet Technology (V) 2017/2018Fizaril Amzari Omar
 
PST SC015 Chapter 3 Internet Technology (IV) 2017/2018
PST SC015 Chapter 3 Internet Technology (IV)  2017/2018PST SC015 Chapter 3 Internet Technology (IV)  2017/2018
PST SC015 Chapter 3 Internet Technology (IV) 2017/2018Fizaril Amzari Omar
 
PST SC015 Chapter 3 Internet Technology (II) 2017/2018
PST SC015 Chapter 3 Internet Technology (II)  2017/2018PST SC015 Chapter 3 Internet Technology (II)  2017/2018
PST SC015 Chapter 3 Internet Technology (II) 2017/2018Fizaril Amzari Omar
 
PST SC015 Chapter 3 Internet Technology (II) 2017/2018
PST SC015 Chapter 3 Internet Technology (II)  2017/2018PST SC015 Chapter 3 Internet Technology (II)  2017/2018
PST SC015 Chapter 3 Internet Technology (II) 2017/2018Fizaril Amzari Omar
 
PST SC015 Chapter 3 Internet Technology (I) 2017/2018
PST SC015 Chapter 3 Internet Technology (I)  2017/2018PST SC015 Chapter 3 Internet Technology (I)  2017/2018
PST SC015 Chapter 3 Internet Technology (I) 2017/2018Fizaril Amzari Omar
 
PST SC015 Chapter 2 Computer System (IV) 2017/2018
PST SC015 Chapter 2 Computer System (IV) 2017/2018PST SC015 Chapter 2 Computer System (IV) 2017/2018
PST SC015 Chapter 2 Computer System (IV) 2017/2018Fizaril Amzari Omar
 
PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018Fizaril Amzari Omar
 
PST SC015 Chapter 2 Computer System (II) 2017/2018
PST SC015 Chapter 2 Computer System (II) 2017/2018PST SC015 Chapter 2 Computer System (II) 2017/2018
PST SC015 Chapter 2 Computer System (II) 2017/2018Fizaril Amzari Omar
 

More from Fizaril Amzari Omar (20)

Chapter 7 Information System
Chapter 7 Information SystemChapter 7 Information System
Chapter 7 Information System
 
Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018
 
Chapter 5 Multimedia SC025 2017/2018
Chapter 5 Multimedia SC025 2017/2018Chapter 5 Multimedia SC025 2017/2018
Chapter 5 Multimedia SC025 2017/2018
 
PDT DC015 Chapter 2 Computer System 2017/2018 (m)
PDT DC015 Chapter 2 Computer System 2017/2018 (m)PDT DC015 Chapter 2 Computer System 2017/2018 (m)
PDT DC015 Chapter 2 Computer System 2017/2018 (m)
 
PDT DC015 Chapter 2 Computer System 2017/2018 (k)
PDT DC015 Chapter 2 Computer System 2017/2018 (k)PDT DC015 Chapter 2 Computer System 2017/2018 (k)
PDT DC015 Chapter 2 Computer System 2017/2018 (k)
 
PDT DC015 Chapter 2 Computer System 2017/2018 (j)
PDT DC015 Chapter 2 Computer System 2017/2018 (j)PDT DC015 Chapter 2 Computer System 2017/2018 (j)
PDT DC015 Chapter 2 Computer System 2017/2018 (j)
 
PDT DC015 Chapter 2 Computer System 2017/2018 (i)
PDT DC015 Chapter 2 Computer System 2017/2018 (i)PDT DC015 Chapter 2 Computer System 2017/2018 (i)
PDT DC015 Chapter 2 Computer System 2017/2018 (i)
 
PDT DC015 Chapter 2 Computer System 2017/2018 (g)
PDT DC015 Chapter 2 Computer System 2017/2018 (g)PDT DC015 Chapter 2 Computer System 2017/2018 (g)
PDT DC015 Chapter 2 Computer System 2017/2018 (g)
 
PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)PDT DC015 Chapter 2 Computer System 2017/2018 (f)
PDT DC015 Chapter 2 Computer System 2017/2018 (f)
 
PDT DC015 Chapter 2 Computer System 2017/2018 (e)
PDT DC015 Chapter 2 Computer System 2017/2018 (e)PDT DC015 Chapter 2 Computer System 2017/2018 (e)
PDT DC015 Chapter 2 Computer System 2017/2018 (e)
 
PDT DC015 Chapter 2 System Concept 2017/2018 (a)
PDT DC015 Chapter 2 System Concept 2017/2018 (a)PDT DC015 Chapter 2 System Concept 2017/2018 (a)
PDT DC015 Chapter 2 System Concept 2017/2018 (a)
 
PST SC015 Chapter 4 Comp. Ethics and Security 2017/2018
PST SC015 Chapter 4 Comp. Ethics and Security 2017/2018PST SC015 Chapter 4 Comp. Ethics and Security 2017/2018
PST SC015 Chapter 4 Comp. Ethics and Security 2017/2018
 
PST SC015 Chapter 3 Internet Technology (V) 2017/2018
PST SC015 Chapter 3 Internet Technology (V)  2017/2018PST SC015 Chapter 3 Internet Technology (V)  2017/2018
PST SC015 Chapter 3 Internet Technology (V) 2017/2018
 
PST SC015 Chapter 3 Internet Technology (IV) 2017/2018
PST SC015 Chapter 3 Internet Technology (IV)  2017/2018PST SC015 Chapter 3 Internet Technology (IV)  2017/2018
PST SC015 Chapter 3 Internet Technology (IV) 2017/2018
 
PST SC015 Chapter 3 Internet Technology (II) 2017/2018
PST SC015 Chapter 3 Internet Technology (II)  2017/2018PST SC015 Chapter 3 Internet Technology (II)  2017/2018
PST SC015 Chapter 3 Internet Technology (II) 2017/2018
 
PST SC015 Chapter 3 Internet Technology (II) 2017/2018
PST SC015 Chapter 3 Internet Technology (II)  2017/2018PST SC015 Chapter 3 Internet Technology (II)  2017/2018
PST SC015 Chapter 3 Internet Technology (II) 2017/2018
 
PST SC015 Chapter 3 Internet Technology (I) 2017/2018
PST SC015 Chapter 3 Internet Technology (I)  2017/2018PST SC015 Chapter 3 Internet Technology (I)  2017/2018
PST SC015 Chapter 3 Internet Technology (I) 2017/2018
 
PST SC015 Chapter 2 Computer System (IV) 2017/2018
PST SC015 Chapter 2 Computer System (IV) 2017/2018PST SC015 Chapter 2 Computer System (IV) 2017/2018
PST SC015 Chapter 2 Computer System (IV) 2017/2018
 
PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018PST SC015 Chapter 2 Computer System (III) 2017/2018
PST SC015 Chapter 2 Computer System (III) 2017/2018
 
PST SC015 Chapter 2 Computer System (II) 2017/2018
PST SC015 Chapter 2 Computer System (II) 2017/2018PST SC015 Chapter 2 Computer System (II) 2017/2018
PST SC015 Chapter 2 Computer System (II) 2017/2018
 

Recently uploaded

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxakanksha16arora
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 

Recently uploaded (20)

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 

PST SC015 Chapter 2 Computer System 2017/2018

  • 1. 1 Chapter Two NUMBER SYSTEM AND REPRESENTATION 2.2 Number System 2.2.1 Binary 2.2.2 Hexadecimal 2.2.3 Conversion Between Binary and Hexadecimal
  • 2. Define Number System ● A set of numerals for representing numbers Decimal Numbers (base 10) Binary Numbers (base 2) Hexadecimal Numbers (base 16) Page 260 Figure 5-2 2 Discovering Computers : Chapter 5
  • 3. Decimal Numbers ● Consists of numbers 0-9 ● Decimal digits are joined together to form longer decimal numbers ● Example: 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12,……… ● also known as the base 10 numbering system 3 6 1 5 6 x 10^2 1 x 10^1 5 x 10^0 6 x 100 1 x 10 5 x 1 600 + 10 + 5 = 615
  • 4. At the end of this topic, students should be able to: represent data in binary forma) 1 Chapter Two NUMBER SYSTEM AND REPRESENTATION 2.2.1 Binary
  • 5. Binary Numbers ● Machine recognises two states: 0 (off) and 1 (on) ● Binary number represents numeric values using two symbols, 0 and 1 ● Eg : 111000, 101 111 111 2
  • 6. Comparison Between Decimal Number and Binary Number 3 DECIMAL BINARY 0 0 1 1 2 10 3 11 4 100 5 101 6 110 DECIMAL BINARY 7 111 8 1 000 9 1 001 10 1 010 11 1 011 . . 40 101 000 . .
  • 7. At the end of this topic, students should be able to: represent data in hexadecimal forma) 1 Chapter Two NUMBER SYSTEM AND REPRESENTATION 2.2.2 Hexadecimal
  • 8. Hexadecimal Numbers ● Uses 16 symbols: 0,1,2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. ● It can represent binary values in compact form. ● 9B416 is example of hexadecimal numbers. 2
  • 9. Comparison Between Decimal Number and Hexadecimal Number 3 DECIMAL HEXADECIMAL 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 DECIMAL HEXADECIMAL 10 A 11 B 12 C 13 D 14 E 15 F 16 10 17 11 20 14 35 23
  • 10. 4 Decimal Hexadecimal Binary 0 0 0 1 1 1 2 2 10 3 3 11 4 4 100 5 5 101 6 6 110 7 7 111 8 8 1000 9 9 1001 10 A 1010 11 B 1011 12 C 1100 13 D 1101 14 E 1110 15 F 1111 Comparison Between Number System
  • 11. At the end of this topic, students should be able to: a. convert from binary to hexadecimal b. convert from hexadecimal to binary 1 Chapter Two NUMBER SYSTEM AND REPRESENTATION 2.2.3 Conversion Between Binary and Hexadecimal
  • 12. Conversion Between Number System ● Decimal to Binary ● Binary to Decimal ● Decimal to Hexadecimal ● Hexadecimal to Decimal ● Binary to Hexadecimal ● Hexadecimal to Binary 2
  • 14. Binary number 2 2 ---- 0 ---- 1 2 2 ---- 1 ---- 0 22 11 5 2 1 0 ---- 1 Hence, 22 = 10110 2 Eg 1: Convert the number 22 to the binary number system. Solution : 22 = 2 2 Write from bottom to top → left to right Decimal to binary conversion 4
  • 15. Eg 2: Convert the number 40 to the binarynumber system. Solution : 40 = 2 2 2 2 2 2 2 40 20 10 5 2 1 0 ---- 0 ---- 0 ---- 0 ---- 1 ---- 0 ---- 1 Binary number Hence, 40 = 101000 2 Write from bottom to top → left to right Decimal to binary conversion 5
  • 16. 2 2 2 2 2 18 9 4 2 1 0 ---- 0 ---- 1 ---- 0 ---- 0 ---- 1 Binary number Hence, 18 = 100102 Eg 3:Express 18 in binary number form Solution 18 = 2 Write from bottom to top → left to right Decimal to binary conversion 6
  • 18. ● In binary number, the column weights (again from right to left) are as follows: ● Eg : convert 1011 2 to decimal number Binary to Decimal conversion 1 0 1 1 1 x (2^3) 0 x (2^2) 1 x (2^1) 1 x (2^0) 1 x 8 0 x 4 1 x 2 1 x 1 Decimal number 8 0 2 1 8+0+2+1=1110 Binary to decimal conversion CONVERSION Eg 1: Convert the number 10112 to the decimal 8
  • 19. Hence, 10110 2 = 22 Eg 1: Convert the binary number 10110 2 to decimal number Solution: 1 0 1 1 0 1 x 2^4 0 x 2^3 1 x 2^2 1 x 2^1 0 x 2^0 2210 1 x 16 0 x 8 1 x 4 1 x 2 0 x 1 16 0 4 2 0 16 + 0 + 4 + 2 + 0 = Binary to decimal conversion CONVERSION Eg 2: Convert the number 101102 to the decimal 9
  • 20. Eg 2 :Convert the binary number 1011100 2 to decimal number Solution: Hence, 1 011 100 2 = 92 1 0 1 1 1 0 0 1 x 2^6 0 x 2^5 1 x 2^4 1 x 2^3 1 x 2^2 0 x 2^1 0 x 2^0 9210 1 0 1 1 1 0 0 1 x 64 0 x 32 1 x 16 1 x 8 1 x 4 0 x 2 0 x 1 64 + 0 + 16 + 8 + 4 + 0 + 0 = Binary to decimal conversion CONVERSION Eg 3: Convert the number 10111002 to the decimal 10
  • 22. 16 16 16 1341 83 5 0 ---- 3 ---- 5 Eg 1: Convert the decimal number 1341 to hexadecimal number Hence,1341 = 53D16 Decimal to hex conversion Hex Number Write from bottom to top → left to right ---- 13 = D 12
  • 23. Eg 2 : Convert the decimal number 860 to hexadecimal number 16 16 16 860 53 3 0 ---- 12 = C ---- 5 ---- 3 Hence, 860 = 35C16 Hex Number Decimal to hex conversion Write from bottom to top → left to right 13
  • 24. 16 16 16 2020 126 7 0 ---- 4 ---- 14 = E ---- 7 Eg 3 : Convert the decimal number 2020 to hexadecimal number Hex Number Decimal to hex conversion Hence, 2020 = 7E416 Write from bottom to top → left to right 14
  • 26. to decimal number● Convert AFB216 Solution: Hence, AFB216 = 44978 Eg 1 : Convert the hex number, AFB216 to decimal number A F B 2 A x 16^3 F x 16^2 B x 16^1 2 x 16^0 4497810 10 x 4096 15 x 256 11 x 16 2 x 1 40960 + 3840 + 176 + 2 = hex to decimal conversion CONVERSION Eg 1: Convert the number AFB16 to the decimal 16
  • 27. to decimal number● Convert BA816 Solution: Hence, BA816 = 2984 Eg 2 : Convert the hex number, BA816 to decimal number B A 8 B x 6^2 A x 16^1 8 x16^0 298410 11 x 256 10 x 16 8 x 1 2816 + 160 + 8 = hex to decimal conversion CONVERSION Eg 2: Convert the number BA816 to the decimal 17
  • 28. to decimal number● Convert AFFA16 Solution: Hence, AFFA16 = 45050 Eg 3 : Convert the hex number, AFFA16 to decimal number A F F A A x 16^3 F x 16^2 F x 16^1 A x16^0 4505010 10 x 4096 15 x 256 15 x16 10 x 1 40960 + 3840 + 240 + 10 = hex to decimal conversion CONVERSION Eg 3: Convert the number AFFA16 to the decimal 18
  • 30. Binary to Hexadecimal conversion ● There are two ways on how to convert the binary to hexadecimal number. ● 1st way : Decimal Hexadecimal ○ Binary ○ 2nd way : ○ Binary Hexadecimal binary to hex conversion 20
  • 31. Eg. 1: Convert the binary number 110102 to hexadecimal 1st way ○ Binary Decimal 26 1 16 16 0 ---- 10 = A ---- 1 Decimal Hexadecimal Hence, 11010 2 = 1A16 1 1 0 1 0 1 x 2^4 1 x 2^3 0 x 2^2 1 x 2^1 0 x 2^0 26 1 x16 1 x8 0 x 4 1 x 2 0 x 1 16 + 8 + 0 + 2 + 0 = Eg. 1: Convert the binary number 110102 to hexadecimal 1st way 21
  • 32. ● Step 1: divide the given binary digit into 4 digit per group from right to left. 1 1 0 1 0 ● Step 2: Using 8421 table, 1 1 0 1 0 1 = 1 8 4 2 1 8 + 2 = 10 = A 8 4 2 1 Hence, 11010 2 = 1A16 Eg. 1: Convert the binary number 110102 to hexadecimal 2nd way 22
  • 33. Binary Decimal binary to hex conversion 18 1 0 ---- 2 ---- 1 Decimal 16 16 Hexadecimal Hence, 100102 = 1216 Hex number Eg.2 :Convert the binary number 100102 to hexadecimal 1st way 1 0 0 1 0 1 x 2^4 0 x 2^3 0 x 2^2 1 x 2^1 0 x 2^0 18 1 x 16 0 x 8 0 x 4 0 x 2 0 x 1 16 + 0 + 0 + 2 + 0 = Eg. 2: Convert the binary number 100102 to hexadecimal 1st way 23
  • 34. Eg.2 :Convert the binary number 100102 to hexadecimal 2nd way ● Step 1: divide the given binary digit into 4 digit per group from right to left. 1 0 0 1 0 ● Step 2: Using 8421 table, 1 0 0 1 0 1 = 1 8 4 2 1 2 = 2 8 4 2 1 Hence, 11010 2 = 1216 24
  • 36. Hexadecimal to Binary conversion ● There are two ways on how to convert the hexadecimal to binary number. ● 1st way : Decimal Binary ○ Hexadecimal ○ 2nd way : ○ Hexadecimal Binary binary to hex conversion 26
  • 37. Eg 1: Convert the hexadecimal number 3FD to binary number 1st way Hexadecimal Decimal 16^2 16^1 16^0 1021 3 F D 256 x3 16 x15 1 x 13 768 + 240 + 13 = hex to binary conversion Eg. 1: Convert the hexadecimal number 3FD16 to binary number 1st way Hexadecimal Decimal 27
  • 38. Binary number De 2 2 2 2 1021 510 ---- 1 255 ---- 0 127 ---- 1 2 63 ---- 1 2 31 ---- 1 2 15 ---- 1 2 7 ---- 1 2 3 ---- 1 2 1 ---- 1 Hence, 3FD16 = 11111111012 0 ---- 1 cimal Binary hex to binary conversion Eg. 1: Convert the hexadecimal number 3FD16 to binary number 1st way 28
  • 39. Eg 1: Convert the hexadecimal number 3FD to binary number 2nd way Hence, 3FD16 = 11111111012 =8+4+1 = 13 =8+4+2+1 = 15 =2+1 = 3 3 F = 15 D = 13 3 15 13 8 4 2 1 8 4 2 1 8 4 2 1 0 0 1 1 1 1 1 1 1 1 0 1 Eg. 1: Convert the hexadecimal number 3FD16 to binary number 2nd way hex to binary conversion 29
  • 40. Eg 2: Convert the hexadecimal number 1A2 to binary number 1st way hex to binary conversion Hexadecimal Decimal Decimal Binary 2 2 2 2 2 2 2 2 2 2 ---- 0 ---- 1 ---- 0 ---- 0 ---- 0 ---- 1 ---- 0 ---- 1 ---- 1 Hence, 1A216 = 1101000102 1 A 2 1 x 16^2 A x 16^1 2 x 16^0 418 1 x 256 10 x 16 2 x 1 256 + 160 + 2 = 418 209 104 52 26 13 6 3 1 0 Eg. 2: Convert the hexadecimal number 1A216 to binary number 1st way DecimalHexadecimal Decimal Binary hex to binary conversion 30
  • 41. Eg 2: Convert the hexadecimal number 1A2 to binary number 2nd way =2=8+2 = 10 =1 Hence, 1A216 = 1101000102 1 A 2 1 10 2 8 4 2 1 8 4 2 1 8 4 2 1 0 0 0 1 1 0 1 0 0 0 1 0 = 2= 8 + 2 = 10 = 1 Eg. 2: Convert the hexadecimal number 1A216 to binary number 2nd way hex to binary conversion 31
  • 42. UPS 2015/2016 Q: Given the Internet Protocol address of a printer as 192.0.0.2. Convert the address to hexadecimal number [2 marks] A: C0.0.0.2 32