SlideShare a Scribd company logo
1 of 7
An Introduction to Computer
Hardware - BKHS
Hexadecimal Numbers

1
01/08/14
Introduction to Hexadecimal
• Base-16 number system
•16 Unique symbols
•Numbers 0 to 9 and letters A to F
•Decimal 10 = A, 11 = B, 12 = C, 13 = D, 14 = E, 15 = F
•Can represent every byte (8 bits) as two hexadecimal
digits
•Easier for humans to read hexadecimal rather than
binary
•Hexadecimal numbers usually have either an 0x prefix
or an h suffix.
Example: 0x3F7A, 85D2h

2
01/08/14
Converting Decimal to Hex
1. Divide the decimal number by 16. Treat the division
as an integer division.
2. Write down the remainder (in hexadecimal).
3. Divide the result again by 16. Treat the division as an
integer division.
4. Repeat step 2 and 3 until result is 0.
5. The hex value is the digit sequence of the remainders
from the last to first.

3
01/08/14
Decimal to Hex Example
Convert 837 to Hex
837/16 = 52 r 5 Least significant
52/16 = 3 r 4
3/16 = 0 r 3 Most Significant
0x345 or 345h

4
01/08/14
Converting Hex to Decimal
1.
2.
3.
4.
5.
6.
7.

Get the last digit (LSD) of the hex number, call
this digit the currentDigit.
Make a variable, let's call it power. Set the value
to 0.
Multiply the current digit with (16^power), store
the result.
Increment power by 1.
Set the the currentDigit to the previous digit of
the hex number.
Repeat from step 3 until all digits have been
multiplied.
Sum the result of step 3 to get the answer number
5
01/08/14
Hex to Decimal Example
Convert 0x58B to Decimal
Last digit (LSD) = 0xB = 11(decimal)
16^0 = 1, 1 x 11 = 11
Next digit = 8
16^1 = 16, 8 x 16 = 128
Next digit (MSD) = 5
16^2 = 256, 5 x 256 = 1280
1280 + 128 + 11 = 1409 decimal

6
01/08/14
Hex to Decimal Example
Convert 0x58B to Decimal
Last digit (LSD) = 0xB = 11(decimal)
16^0 = 1, 1 x 11 = 11
Next digit = 8
16^1 = 16, 8 x 16 = 128
Next digit (MSD) = 5
16^2 = 256, 5 x 256 = 1280
1280 + 128 + 11 = 1409 decimal

6
01/08/14

More Related Content

What's hot

Number system
Number systemNumber system
Number system
kashee99
 
Introduction to digital electornics
Introduction to digital electornicsIntroduction to digital electornics
Introduction to digital electornics
harman kaur
 
Number System
Number SystemNumber System
Number System
itutor
 

What's hot (20)

Number system conversion
Number system conversionNumber system conversion
Number system conversion
 
Number system
Number systemNumber system
Number system
 
Number system of computer
Number system of computerNumber system of computer
Number system of computer
 
Number system
Number systemNumber system
Number system
 
Number system
Number systemNumber system
Number system
 
Number System (Binary,octal,Decimal,Hexadecimal)
Number System (Binary,octal,Decimal,Hexadecimal)Number System (Binary,octal,Decimal,Hexadecimal)
Number System (Binary,octal,Decimal,Hexadecimal)
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 
Introduction to digital electornics
Introduction to digital electornicsIntroduction to digital electornics
Introduction to digital electornics
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Number System
Number SystemNumber System
Number System
 
11 octal number system
11   octal number system11   octal number system
11 octal number system
 
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEMBINARY NUMBER SYSTEM
BINARY NUMBER SYSTEM
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representation
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
Hexadecimal (Calculations and Explanations)
Hexadecimal (Calculations and Explanations)Hexadecimal (Calculations and Explanations)
Hexadecimal (Calculations and Explanations)
 
PPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMPPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEM
 
BCD.
BCD.BCD.
BCD.
 
Number system.pdf
Number system.pdfNumber system.pdf
Number system.pdf
 
1s and 2s complement
1s and 2s complement1s and 2s complement
1s and 2s complement
 
Number System
Number SystemNumber System
Number System
 

Viewers also liked

Hexadecimal
HexadecimalHexadecimal
Hexadecimal
wardjo
 
Fundamentals of Computers
Fundamentals of ComputersFundamentals of Computers
Fundamentals of Computers
Ankur Kumar
 
Computer Basic Definitions
Computer Basic DefinitionsComputer Basic Definitions
Computer Basic Definitions
norzaini
 
Introduction to Computers
Introduction to ComputersIntroduction to Computers
Introduction to Computers
Samudin Kassan
 

Viewers also liked (18)

Hexadecimal
HexadecimalHexadecimal
Hexadecimal
 
hexadecimal notes By ZAK
hexadecimal notes By ZAKhexadecimal notes By ZAK
hexadecimal notes By ZAK
 
Chapter iii: Number System
Chapter iii: Number SystemChapter iii: Number System
Chapter iii: Number System
 
Fundamentals of Computers
Fundamentals of ComputersFundamentals of Computers
Fundamentals of Computers
 
[1] Data Representation
[1] Data Representation[1] Data Representation
[1] Data Representation
 
Computer Elements
Computer ElementsComputer Elements
Computer Elements
 
Computer Basic Definitions
Computer Basic DefinitionsComputer Basic Definitions
Computer Basic Definitions
 
Presentation on computer data storage
Presentation on computer data storage Presentation on computer data storage
Presentation on computer data storage
 
Bidang pembelajaran 2.1 tingkatan 4
Bidang pembelajaran 2.1 tingkatan 4Bidang pembelajaran 2.1 tingkatan 4
Bidang pembelajaran 2.1 tingkatan 4
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Data and information
Data and informationData and information
Data and information
 
Data vs. information
Data vs. informationData vs. information
Data vs. information
 
Computer languages 11
Computer languages 11Computer languages 11
Computer languages 11
 
Computer Data Representation
Computer Data RepresentationComputer Data Representation
Computer Data Representation
 
Data presentation 2
Data presentation 2Data presentation 2
Data presentation 2
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 
Introduction to Computers
Introduction to ComputersIntroduction to Computers
Introduction to Computers
 

Similar to Hexadecimal numbers

Similar to Hexadecimal numbers (20)

numbers_systems.ppt
numbers_systems.pptnumbers_systems.ppt
numbers_systems.ppt
 
numbers_systems.ppt
numbers_systems.pptnumbers_systems.ppt
numbers_systems.ppt
 
numbers_systems.ppt
numbers_systems.pptnumbers_systems.ppt
numbers_systems.ppt
 
numbers_systems.pptx
numbers_systems.pptxnumbers_systems.pptx
numbers_systems.pptx
 
Conversion between various numbers_systems
Conversion between various numbers_systemsConversion between various numbers_systems
Conversion between various numbers_systems
 
numbers_systems (1).ppt
numbers_systems (1).pptnumbers_systems (1).ppt
numbers_systems (1).ppt
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawab
 
Lesson4.3 u4 l1 hexadecimal representation
Lesson4.3 u4 l1 hexadecimal representationLesson4.3 u4 l1 hexadecimal representation
Lesson4.3 u4 l1 hexadecimal representation
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Data representation
Data representationData representation
Data representation
 
numbering system binary and decimal hex octal
numbering system binary and decimal hex octalnumbering system binary and decimal hex octal
numbering system binary and decimal hex octal
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number system
 
Number system
Number systemNumber system
Number system
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
 
Digital electronics number system notes
Digital electronics number system notesDigital electronics number system notes
Digital electronics number system notes
 
Number system
Number systemNumber system
Number system
 
Numsys
NumsysNumsys
Numsys
 
DIGITAL DESIGN
DIGITAL DESIGNDIGITAL DESIGN
DIGITAL DESIGN
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptx
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Recently uploaded (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Hexadecimal numbers

  • 1. An Introduction to Computer Hardware - BKHS Hexadecimal Numbers 1 01/08/14
  • 2. Introduction to Hexadecimal • Base-16 number system •16 Unique symbols •Numbers 0 to 9 and letters A to F •Decimal 10 = A, 11 = B, 12 = C, 13 = D, 14 = E, 15 = F •Can represent every byte (8 bits) as two hexadecimal digits •Easier for humans to read hexadecimal rather than binary •Hexadecimal numbers usually have either an 0x prefix or an h suffix. Example: 0x3F7A, 85D2h 2 01/08/14
  • 3. Converting Decimal to Hex 1. Divide the decimal number by 16. Treat the division as an integer division. 2. Write down the remainder (in hexadecimal). 3. Divide the result again by 16. Treat the division as an integer division. 4. Repeat step 2 and 3 until result is 0. 5. The hex value is the digit sequence of the remainders from the last to first. 3 01/08/14
  • 4. Decimal to Hex Example Convert 837 to Hex 837/16 = 52 r 5 Least significant 52/16 = 3 r 4 3/16 = 0 r 3 Most Significant 0x345 or 345h 4 01/08/14
  • 5. Converting Hex to Decimal 1. 2. 3. 4. 5. 6. 7. Get the last digit (LSD) of the hex number, call this digit the currentDigit. Make a variable, let's call it power. Set the value to 0. Multiply the current digit with (16^power), store the result. Increment power by 1. Set the the currentDigit to the previous digit of the hex number. Repeat from step 3 until all digits have been multiplied. Sum the result of step 3 to get the answer number 5 01/08/14
  • 6. Hex to Decimal Example Convert 0x58B to Decimal Last digit (LSD) = 0xB = 11(decimal) 16^0 = 1, 1 x 11 = 11 Next digit = 8 16^1 = 16, 8 x 16 = 128 Next digit (MSD) = 5 16^2 = 256, 5 x 256 = 1280 1280 + 128 + 11 = 1409 decimal 6 01/08/14
  • 7. Hex to Decimal Example Convert 0x58B to Decimal Last digit (LSD) = 0xB = 11(decimal) 16^0 = 1, 1 x 11 = 11 Next digit = 8 16^1 = 16, 8 x 16 = 128 Next digit (MSD) = 5 16^2 = 256, 5 x 256 = 1280 1280 + 128 + 11 = 1409 decimal 6 01/08/14