0% found this document useful (0 votes)
142 views15 pages

L2-2 Hexadecimal and Octal Numbers

The document covers number systems including decimal, binary, hexadecimal, and octal, along with their conversions. It provides detailed methods for converting between these systems, including examples for clarity. Additionally, it includes quizzes and problems to test understanding of the concepts presented.

Uploaded by

nan susu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
142 views15 pages

L2-2 Hexadecimal and Octal Numbers

The document covers number systems including decimal, binary, hexadecimal, and octal, along with their conversions. It provides detailed methods for converting between these systems, including examples for clarity. Additionally, it includes quizzes and problems to test understanding of the concepts presented.

Uploaded by

nan susu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2.

Number Systems and Digital Codes

• Decimal & Binary Numbers and their Conversions

• Hexadecimal and Octal Numbers

• Binary Coded Decimal (BCD) and Digital Codes


Hexadecimal and Octal Numbers

Lesson Outlines Lesson Objectives


1. Hexadecimal Numbers ▪ To clearly understand the
2. Binary to Hexadecimal Conversion
Hexadecimal and Octal Number
3. Hexadecimal to Binary Conversion
System and their conversion to
4. Hexadecimal to Decimal Conversion
Binary and Decimal Numbers
5. Decimal to Hexadecimal Conversion
6. Octal Numbers
7. Octal to Decimal Conversion
8. Decimal to Octal Conversion
9. Octal to Binary Conversion
10. Binary to Octal Conversion
2

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers

1. Hexadecimal Numbers

• 16 numeric and alphabetic characters


• a base-sixteen system
• represents a 4-bit binary number
• Counting in Hexadecimal
.. , E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D,
1E, 1F, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2A, 2B, 2C, 2D,
2E, 2F, 30, 31, …….

• E.g. two hexadecimal digits count up to FF16

3

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
2. Binary to Hexadecimal Conversion
• break the binary number into 4-bit groups, starting at the right-most bit and
replace each 4-bit group with the equivalent hexadecimal symbol.

EXAMPLE 2–2.1

Convert the binary numbers to hexadecimal: 1100101001010111.


Solution:
1100101001010111
C A 5 7

4

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
3. Hexadecimal to Binary Conversion

EXAMPLE 2–2.2

Convert the hexadecimal number to Binary : (a) 10A416 (b) CF8E16


Solution:
(a) (b)

5

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
4. Hexadecimal to Decimal Conversion
Method -1
• Convert the hexadecimal number to binary first, then to decimal

EXAMPLE 2–2.3

Convert the hexadecimal number to Decimal : A8516.


Solution:

6

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
Method -2
• Multiply the decimal value of each hexadecimal digit by its weight then
sum of these products.
• Weights of hexadecimal are 163 162 161 160
4096 256 16 1
EXAMPLE 2–2.4
Convert the hexadecimal number to Decimal : B2F816
Solution:

7

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
5. Decimal to Hexadecimal Conversion
Repeated Division by 16 Method

EXAMPLE 2–2.5 Convert the decimal number 650 to hexadecimal number.


Solution:

8

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers

6. Octal Numbers

• composed of eight digits : 0, 1, 2, 3, 4, 5, 6, 7


• a base-eight system
• represents a 3-bit binary number
• Counting in Octal number
0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, ……

9

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
7. Octal to Decimal Conversion

EXAMPLE 2–2.6

Convert the Octal number to Decimal : 23748.


Solution:

10

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
8. Decimal to Octal Conversion
Repeated Division by 8 Method
EXAMPLE 2–2.7 Convert the Decimal number to Octal : 35910.
Solution:

11

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
9. Octal to Binary Conversion

EXAMPLE 2–2.8

Convert the Octal number to Binary : (a) 1408 (b) 75268


Solution: (a) (b)

12

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
10. Binary to Octal Conversion

EXAMPLE 2–2.9

Convert the Binary number to Octal : (a) 101111001 (b) 100110011010.


Solution: (a) (b)

13

Faculty of Computer Systems and Technologies 15
Hexadecimal and Octal Numbers
Quiz

1. The octal number system is a weighted system with eight digits. (T/F)
2. The binary number 101100111001010100001 can be written in octal as ------------------.
3. The binary number 10001101010001101111 can be written in hexadecimal as --------------.
4. The binary number for F7A916 is ---------------------------.

Problems
1. Convert the decimal number “7825” to hexadecimal.
2. Convert the hexadecimal number “6F116” to decimal .
3. Convert the octal number 26738 to decimal.
4. Convert the decimal number “654” to octal by repeated division by 8.
14

Faculty of Computer Systems and Technologies 15
Thank You
For your attention

15

Faculty of Computer Systems and Technologies 15

You might also like