SlideShare a Scribd company logo
Number Systems
Prepared By
M Prasannakumar
Asst.Professor
Dept of Electronics
• In digital electronics, the number system is used for
representing the information.
• The number system has different bases.
• The base or radix of the number system is the total number of
the digit used in the number system.
• Suppose if the number system representing the digit from 0 – 9
then the base of the system is the 10.
Types of Number Systems
Some of the important types of number system are
 Decimal Number System
 Binary Number System
 Octal Number System
 Hexadecimal Number System
These number systems are explained below in details.
1. Decimal Number Systems
The number system is having digit 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 this
number system is known as a decimal number system because
total ten digits are involved.
The base of the decimal number system is 10.
2. Binary Number Systems
• The modern computers do not process decimal number they
work with another number system known as a binary number
system.
• The Binary Number System uses only two digits 0 and1.
• The base of binary number system is 2 because it has only two
digit 0 and 1.
• The digital electronic equipments are works on the binary
number system and hence the decimal number system is
converted into binary system.
3. Octal Numbers
• The base of a number system is equal to the number of digits
used, i.e., for decimal number system the base is ten while for
the binary system the base is two.
• The octal system has the base of eight as it uses eight digits 0, 1,
2, 3, 4, 5, 6, 7.
4. Hexadecimal Numbers
• These numbers are used extensively in microprocessor work.
• The hexadecimal number system has a base of 16, and hence it
consists of the following sixteen number of digits.
• 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Common Number Systems
System Base Symbols
Used by
humans?
Used in
computers?
Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa-
decimal
16 0, 1, … 9,
A, B, … F
Yes No
Quantities/Counting (1 of 3)
Decimal Binary Octal
Hexa-
decimal
0 000 0 0
1 0001 1 1
2 0010 2 2
3 011 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
p. 33
Quantities/Counting (2 of 3)
Decimal Binary Octal
Hexa-
decimal
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Quantities/Counting (3 of 3)
Decimal Binary Octal
Hexa-
decimal
16 10000 20 10
17 10001 21 11
18 10010 22 12
19 10011 23 13
20 10100 24 14
21 10101 25 15
22 10110 26 16
23 10111 27 17 Etc.
Conversion Among Bases
• The possibilities:
Hexadecimal
Decimal Octal
Binary
pp. 40-46
Quick Example
2510 = 110012 = 318 = 1916
Base
Decimal to Decimal (just for fun)
Hexadecimal
Decimal Octal
Binary
Next slide…
125410 => 4 x 100 = 4
5 x 101 = 50
2 x 102 = 200
1 x 103 =1000
1254
Base
Weight
Binary to Decimal
Hexadecimal
Decimal Octal
Binary
Binary to Decimal
• Technique
– Multiply each bit by 2n, where n is the “weight”
of the bit
– The weight is the position of the bit, starting
from 0 on the right
– Add the results
Example
1010112 => 1 x 20 = 1
1 x 21 = 2
0 x 22 = 0
1 x 23 = 8
0 x 24 = 0
1 x 25 = 32
4310
Bit “0”
Decimal to Binary
Hexadecimal
Decimal Octal
Binary
Decimal to Binary
• Technique
– Divide by two, keep track of the remainder
– First remainder is bit 0 (LSB, least-significant
bit)
– Second remainder is bit 1
– Etc.
Example
12510 = ?2
2 125
62 1
2
31 0
2
15 1
2
7 1
2
3 1
2
1 1
12510 = 11111012
Hexadecimal to Decimal
Hexadecimal
Decimal Octal
Binary
Hexadecimal to Decimal
• Technique
– Multiply each bit by 16n, where n is the
“weight” of the bit
– The weight is the position of the bit, starting
from 0 on the right
– Add the results
Example
ABC16 => C x 160 = 12 x 1 = 12
B x 161 = 11 x 16 = 176
A x 162 = 10 x 256 = 2560
274810
Decimal to Hexadecimal
Hexadecimal
Decimal Octal
Binary
Decimal to Hexadecimal
• Technique
– Divide by 16
– Keep track of the remainder
Example
123410 = ?16
123410 = 4D216
16 1234
77 2
16
4 13 = D
Octal to Decimal
Hexadecimal
Decimal Octal
Binary
Octal to Decimal
• Technique
– Multiply each bit by 8n, where n is the “weight”
of the bit
– The weight is the position of the bit, starting
from 0 on the right
– Add the results
Example
7248 => 4 x 80 = 4
2 x 81 = 16
7 x 82 = 448
46810
Decimal to Octal
Hexadecimal
Decimal Octal
Binary
Decimal to Octal
• Technique
– Divide by 8
– Keep track of the remainder
Example
123410 = ?8
8 1234
154 2
8
19 2
8
2 3
123410 = 23228
Binary to Hexadecimal
Hexadecimal
Decimal Octal
Binary
Binary to Hexadecimal
• Technique
– Group bits in fours, starting on right
– Convert to hexadecimal digits
Example
10101110112 = ?16
0010 1011 1011
2 B B
10101110112 = 2BB16
Hexadecimal to Binary
Hexadecimal
Decimal Octal
Binary
Hexadecimal to Binary
• Technique
– Convert each hexadecimal digit to a 4-bit
equivalent binary representation
Example
10AF16 = ?2
1 0 A F
0001 0000 1010 1111
10AF16 = 00010000101011112
Binary to Octal
Hexadecimal
Decimal Octal
Binary
Binary to Octal
• Technique
– Group bits in threes, starting on right
– Convert to octal digits
Example
10110101112 = ?8
1 011 010 111
1 3 2 7
10110101112 = 13278
Octal to Binary
Hexadecimal
Decimal Octal
Binary
Octal to Binary
• Technique
– Convert each octal digit to a 3-bit equivalent
binary representation
Example
7058 = ?2
7 0 5
111 000 101
7058 = 1110001012
Octal to Hexadecimal
Hexadecimal
Decimal Octal
Binary
Octal to Hexadecimal
• Technique
– Use binary as an intermediary
Example
10768 = ?16
1 0 7 6
001 000 111 110
2 3 E
10768 = 23E16
Hexadecimal to Octal
Hexadecimal
Decimal Octal
Binary
Hexadecimal to Octal
• Technique
– Use binary as an intermediary
Example
1F0C16 = ?8
1 F 0 C
0001 1111 0000 1100
1 7 4 1 4
1F0C16 = 174148
Exercise – Convert ...
Don’t use a calculator!
Decimal Binary Octal
Hexa-
decimal
33
1110101
703
1AF
Skip answer Answer
Number systems  r002
Exercise – Convert …
Decimal Binary Octal
Hexa-
decimal
33 100001 41 21
117 1110101 165 75
451 111000011 703 1C3
431 110101111 657 1AF
Answer
Common Powers (1 of 2)
• Base 10
Power Preface Symbol
10-12 pico p
10-9 nano n
10-6 micro 
10-3 milli m
103 kilo k
106 mega M
109 giga G
1012 tera T
Value
.000000000001
.000000001
.000001
.001
1000
1000000
1000000000
1000000000000
Common Powers (2 of 2)
• Base 2
Power Preface Symbol
210 kilo k
220 mega M
230 Giga G
Value
1024
1048576
1073741824
• What is the value of “k”, “M”, and “G”?
• In computing, particularly w.r.t. memory,
the base-2 interpretation generally applies
Fractions
• Binary to decimal
pp. 46-50
10.1011 => 1 x 2-4 = 0.0625
1 x 2-3 = 0.125
0 x 2-2 = 0.0
1 x 2-1 = 0.5
0 x 20 = 0.0
1 x 21 = 2.0
2.6875
Fractions
• Decimal to binary
p. 50
3.14579
.14579
x 2
0.29158
x 2
0.58316
x 2
1.16632
x 2
0.33264
x 2
0.66528
x 2
1.33056
etc.
11.00100
Fractions
• Hex decimal to decimal:
B0. A031 => 1 x 16-4 = 0.0001
3 x 16-3 = 0.0007
0 x 16-2 = 0.0000
10 x 16-1 = 0.6250
0 x 160 = 0.0
11 x 161 =176.
176.6258
Fractions
• Decimal to Hex Decimal
32.14579
.14579
x 16
2.33264
x 16
5.32224
x 16
5.15584
x 16
2.49344
x 16
7.89504
x 16
14 .32064
etc.
20.25527E
Fractions
• Octal to decimal:
27.1031 => 1 x 8-4 = 0.0002
3 x 8-3 = 0.005
0 x 8-2 = 0.000
1 x 8-1 = 0.125
7 x 80 = 7.
2 x 81 = 16.
23.1302
Fractions
• Decimal to Octal
32.14579
.14579
x 8
1.16632
x 8
1.33056
x 8
2.64448
x 8
5.15584
x 8
1.24672
x 8
1 .97376
etc.
40.112511
Fractional
Binary to Hexa- decimal
(a) 11110.010112
Solution:
11110.010112
= 0001 1110 . 0101 1000
= 1E.5816
Therefore, 11110.010112 = 1E.5816
Fractional
Hexa-decimal to Binary
(b) BA2.23C16
Solution:
= B A 2 . 2 3 C
= 1011 1010 0010 . 0010 0011 11002
= 101110100010.0010001111
Hence the required binary equivalent is
101110100010 . 0010001111.
Fractional
Binary to Octal
(a) 111101.011012
Solution:
111101.0110102
= 75.328
Hence the required octal equivalent is 75.32.
Fractional
Octal to Binary
(b) 64.1758
Solution:
= 6 4 . 1 7 5
= 110 100 . 001 111 101
= 110100.0011111012
Hence the required binary number is
110100.001111101.
Chapter 1 65
Example: Fractional Octal to Hexadecimal via
Binary
1. Convert octal to binary
2. Use groups of four binary bits and express them as
hexadecimal digits
• Example: Octal  Binary  Hexadecimal
(6 3 5 . 1 7 5)8
110 011 101. 001 111 101
000110011101. 001111101000
= (1 9 D . 3 E 8)16
Represent Octal in binary
Group into 4 bit groups for
both the integer and
fraction parts, starting at
the radix point
Append leading 0’s to the
left of integer part and
trailing 0’s to the right of
the fraction part as needed
Express each group of 4
bits in hex
Appended 0’s
Example: Fractional Hexadecimal to Octal via Binary
1. Convert Hexadecimal to binary
2. Use groups of three binary bits and express them
as octal digits
• Example: Hexadecimal  Binary  Octal
• (6 3 5 . 1 7 5)16
0110 0011 0101. 0001 0111 0101
=011 000 110 101. 000 101 110 101
= (3065.0565)16
Exercise – Convert ...
Don’t use a calculator!
Decimal Binary Octal
Hexa-
decimal
29.8
101.1101
3.07
C.82
Skip answer Answer
Exercise – Convert …
Decimal Binary Octal
Hexa-
decimal
29.8 11101.110011… 35.63… 1D.CC…
5.8125 101.1101 5.64 5.D
3.109375 11.000111 3.07 3.1C
12.5078125 1100.10000010 14.404 C.82
Answer
Thank you
Next topic

More Related Content

PPTX
Number system
Suraj Bora
 
PPT
Number system and codes
Abhiraj Bohra
 
PPTX
Number System
Ramesh Ragala
 
PDF
sparse matrix in data structure
MAHALAKSHMI P
 
PPTX
Chapter 2.1 introduction to number system
ISMT College
 
PPTX
Floating point representation
missstevenson01
 
DOCX
Number system.pdf
DeepuGuna
 
PPT
Ascii codes
Saddam Hussain Soomro
 
Number system
Suraj Bora
 
Number system and codes
Abhiraj Bohra
 
Number System
Ramesh Ragala
 
sparse matrix in data structure
MAHALAKSHMI P
 
Chapter 2.1 introduction to number system
ISMT College
 
Floating point representation
missstevenson01
 
Number system.pdf
DeepuGuna
 

What's hot (20)

PPTX
Introduction to digital electornics
harman kaur
 
PPT
Instruction format
Sanjeev Patel
 
PPT
Number systems ppt
sudarmani rajagopal
 
PPTX
What is Gray Code?
Mukesh Tekwani
 
PPTX
Number System
Zahid Rajeel
 
PPT
binary number system
vishal gupta
 
PPTX
Disjoint sets union, find
subhashchandra197
 
PPTX
Number system
Palash Sachan
 
PPTX
Number system conversion
Kawsar Hamid Sumon
 
PPS
Ram and-rom-chips
Anuj Modi
 
PDF
BCD to Decimal - Digital Electronics
Milap Bhanderi
 
PPTX
Number+system (1)
Bilal Maqbool ツ
 
PPTX
Representation of binary tree in memory
Rohini Shinde
 
PDF
Advanced data structures vol. 1
Christalin Nelson
 
PPT
Binary codes
ZareenRauf1
 
PPT
BINARY NUMBER SYSTEM
Zaheer Abbasi
 
PPTX
Micro program example
rajshreemuthiah
 
PPT
DATA REPRESENTATION
Dr. Ajay Kumar Singh
 
PDF
BINARY SUBTRACTION
UoHCollegeScienceOfComputer
 
PPT
W 9 numbering system
Institute of Management Studies UOP
 
Introduction to digital electornics
harman kaur
 
Instruction format
Sanjeev Patel
 
Number systems ppt
sudarmani rajagopal
 
What is Gray Code?
Mukesh Tekwani
 
Number System
Zahid Rajeel
 
binary number system
vishal gupta
 
Disjoint sets union, find
subhashchandra197
 
Number system
Palash Sachan
 
Number system conversion
Kawsar Hamid Sumon
 
Ram and-rom-chips
Anuj Modi
 
BCD to Decimal - Digital Electronics
Milap Bhanderi
 
Number+system (1)
Bilal Maqbool ツ
 
Representation of binary tree in memory
Rohini Shinde
 
Advanced data structures vol. 1
Christalin Nelson
 
Binary codes
ZareenRauf1
 
BINARY NUMBER SYSTEM
Zaheer Abbasi
 
Micro program example
rajshreemuthiah
 
DATA REPRESENTATION
Dr. Ajay Kumar Singh
 
BINARY SUBTRACTION
UoHCollegeScienceOfComputer
 
Ad

Similar to Number systems r002 (20)

PPTX
ITC lecture 3.pptx
RizwanTariq18
 
PDF
Number Systems
Reggie Niccolo Santos
 
PPT
Number System.ppt
MuhammadMuneeb803785
 
PPT
Bca 2nd sem u-1.1 digital logic circuits, digital component floting and fixed...
Rai University
 
PPT
B.sc cs-ii -u-1.1 digital logic circuits, digital component floting and fixed...
Rai University
 
PPT
Mca i-u-1.1 digital logic circuits, digital component floting and fixed point
Rai University
 
PPT
digital logic circuits, digital component floting and fixed point
Rai University
 
PPT
Number Systems
student
 
PPT
Number Systems
student
 
PPT
Binary number systems
KULDEEP MATHUR
 
PPT
Number systems
Volodymyr Ushenko
 
PPTX
Number system de (2131004) - 160920107003
Prashant odhavani
 
PPT
Number Systems for class 11 computer science
NeeladriSen3
 
PPT
al about NumberSystems& conversion etc.ppt
zihadsha701
 
PDF
Number Systems Digital Logic and Microprocessor
PRADEEPAM9
 
PPTX
number system 1.pptx
MohammadAnsari340279
 
PPT
5871320.ppt
BikashPaul14
 
PPT
Computer Number System
Ahi Bhusan Mukherjee
 
PPT
01.number systems
rasha3
 
PPTX
chapter 3 number systems register transfer
rashidxasan369
 
ITC lecture 3.pptx
RizwanTariq18
 
Number Systems
Reggie Niccolo Santos
 
Number System.ppt
MuhammadMuneeb803785
 
Bca 2nd sem u-1.1 digital logic circuits, digital component floting and fixed...
Rai University
 
B.sc cs-ii -u-1.1 digital logic circuits, digital component floting and fixed...
Rai University
 
Mca i-u-1.1 digital logic circuits, digital component floting and fixed point
Rai University
 
digital logic circuits, digital component floting and fixed point
Rai University
 
Number Systems
student
 
Number Systems
student
 
Binary number systems
KULDEEP MATHUR
 
Number systems
Volodymyr Ushenko
 
Number system de (2131004) - 160920107003
Prashant odhavani
 
Number Systems for class 11 computer science
NeeladriSen3
 
al about NumberSystems& conversion etc.ppt
zihadsha701
 
Number Systems Digital Logic and Microprocessor
PRADEEPAM9
 
number system 1.pptx
MohammadAnsari340279
 
5871320.ppt
BikashPaul14
 
Computer Number System
Ahi Bhusan Mukherjee
 
01.number systems
rasha3
 
chapter 3 number systems register transfer
rashidxasan369
 
Ad

More from arunachalamr16 (20)

PPT
Pipeline r014
arunachalamr16
 
PPT
Registers r011
arunachalamr16
 
PPT
08 logic simplification
arunachalamr16
 
PDF
Boolean algebra r009
arunachalamr16
 
PPT
Boolean variables r010
arunachalamr16
 
PPT
Central processing unit and stack organization r013
arunachalamr16
 
PPT
Combinational circuits r011
arunachalamr16
 
PPT
Counters r012
arunachalamr16
 
PPT
Flipflop r012
arunachalamr16
 
PPT
Code conversion r006
arunachalamr16
 
PPT
Binary coded decimal r004
arunachalamr16
 
PPT
Digital fundamendals r001a
arunachalamr16
 
PDF
Universal gates r008
arunachalamr16
 
PPT
Logic gates r007
arunachalamr16
 
PDF
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
arunachalamr16
 
PPT
Error detection and correction codes r006
arunachalamr16
 
PPTX
Codes r005
arunachalamr16
 
PPT
1sand2scomplement r004
arunachalamr16
 
PPT
1’s and 2’s complements
arunachalamr16
 
PPTX
Pill camera
arunachalamr16
 
Pipeline r014
arunachalamr16
 
Registers r011
arunachalamr16
 
08 logic simplification
arunachalamr16
 
Boolean algebra r009
arunachalamr16
 
Boolean variables r010
arunachalamr16
 
Central processing unit and stack organization r013
arunachalamr16
 
Combinational circuits r011
arunachalamr16
 
Counters r012
arunachalamr16
 
Flipflop r012
arunachalamr16
 
Code conversion r006
arunachalamr16
 
Binary coded decimal r004
arunachalamr16
 
Digital fundamendals r001a
arunachalamr16
 
Universal gates r008
arunachalamr16
 
Logic gates r007
arunachalamr16
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
arunachalamr16
 
Error detection and correction codes r006
arunachalamr16
 
Codes r005
arunachalamr16
 
1sand2scomplement r004
arunachalamr16
 
1’s and 2’s complements
arunachalamr16
 
Pill camera
arunachalamr16
 

Recently uploaded (20)

PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
DOCX
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PPTX
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
PPTX
How to Apply for a Job From Odoo 18 Website
Celine George
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
Virus sequence retrieval from NCBI database
yamunaK13
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
Basics and rules of probability with real-life uses
ravatkaran694
 
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
How to Apply for a Job From Odoo 18 Website
Celine George
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 

Number systems r002

  • 1. Number Systems Prepared By M Prasannakumar Asst.Professor Dept of Electronics
  • 2. • In digital electronics, the number system is used for representing the information. • The number system has different bases. • The base or radix of the number system is the total number of the digit used in the number system. • Suppose if the number system representing the digit from 0 – 9 then the base of the system is the 10. Types of Number Systems Some of the important types of number system are  Decimal Number System  Binary Number System  Octal Number System  Hexadecimal Number System These number systems are explained below in details.
  • 3. 1. Decimal Number Systems The number system is having digit 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 this number system is known as a decimal number system because total ten digits are involved. The base of the decimal number system is 10.
  • 4. 2. Binary Number Systems • The modern computers do not process decimal number they work with another number system known as a binary number system. • The Binary Number System uses only two digits 0 and1. • The base of binary number system is 2 because it has only two digit 0 and 1. • The digital electronic equipments are works on the binary number system and hence the decimal number system is converted into binary system.
  • 5. 3. Octal Numbers • The base of a number system is equal to the number of digits used, i.e., for decimal number system the base is ten while for the binary system the base is two. • The octal system has the base of eight as it uses eight digits 0, 1, 2, 3, 4, 5, 6, 7. 4. Hexadecimal Numbers • These numbers are used extensively in microprocessor work. • The hexadecimal number system has a base of 16, and hence it consists of the following sixteen number of digits. • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
  • 6. Common Number Systems System Base Symbols Used by humans? Used in computers? Decimal 10 0, 1, … 9 Yes No Binary 2 0, 1 No Yes Octal 8 0, 1, … 7 No No Hexa- decimal 16 0, 1, … 9, A, B, … F Yes No
  • 7. Quantities/Counting (1 of 3) Decimal Binary Octal Hexa- decimal 0 000 0 0 1 0001 1 1 2 0010 2 2 3 011 3 3 4 100 4 4 5 101 5 5 6 110 6 6 7 111 7 7 p. 33
  • 8. Quantities/Counting (2 of 3) Decimal Binary Octal Hexa- decimal 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F
  • 9. Quantities/Counting (3 of 3) Decimal Binary Octal Hexa- decimal 16 10000 20 10 17 10001 21 11 18 10010 22 12 19 10011 23 13 20 10100 24 14 21 10101 25 15 22 10110 26 16 23 10111 27 17 Etc.
  • 10. Conversion Among Bases • The possibilities: Hexadecimal Decimal Octal Binary pp. 40-46
  • 11. Quick Example 2510 = 110012 = 318 = 1916 Base
  • 12. Decimal to Decimal (just for fun) Hexadecimal Decimal Octal Binary Next slide…
  • 13. 125410 => 4 x 100 = 4 5 x 101 = 50 2 x 102 = 200 1 x 103 =1000 1254 Base Weight
  • 15. Binary to Decimal • Technique – Multiply each bit by 2n, where n is the “weight” of the bit – The weight is the position of the bit, starting from 0 on the right – Add the results
  • 16. Example 1010112 => 1 x 20 = 1 1 x 21 = 2 0 x 22 = 0 1 x 23 = 8 0 x 24 = 0 1 x 25 = 32 4310 Bit “0”
  • 18. Decimal to Binary • Technique – Divide by two, keep track of the remainder – First remainder is bit 0 (LSB, least-significant bit) – Second remainder is bit 1 – Etc.
  • 19. Example 12510 = ?2 2 125 62 1 2 31 0 2 15 1 2 7 1 2 3 1 2 1 1 12510 = 11111012
  • 21. Hexadecimal to Decimal • Technique – Multiply each bit by 16n, where n is the “weight” of the bit – The weight is the position of the bit, starting from 0 on the right – Add the results
  • 22. Example ABC16 => C x 160 = 12 x 1 = 12 B x 161 = 11 x 16 = 176 A x 162 = 10 x 256 = 2560 274810
  • 24. Decimal to Hexadecimal • Technique – Divide by 16 – Keep track of the remainder
  • 25. Example 123410 = ?16 123410 = 4D216 16 1234 77 2 16 4 13 = D
  • 27. Octal to Decimal • Technique – Multiply each bit by 8n, where n is the “weight” of the bit – The weight is the position of the bit, starting from 0 on the right – Add the results
  • 28. Example 7248 => 4 x 80 = 4 2 x 81 = 16 7 x 82 = 448 46810
  • 30. Decimal to Octal • Technique – Divide by 8 – Keep track of the remainder
  • 31. Example 123410 = ?8 8 1234 154 2 8 19 2 8 2 3 123410 = 23228
  • 33. Binary to Hexadecimal • Technique – Group bits in fours, starting on right – Convert to hexadecimal digits
  • 34. Example 10101110112 = ?16 0010 1011 1011 2 B B 10101110112 = 2BB16
  • 36. Hexadecimal to Binary • Technique – Convert each hexadecimal digit to a 4-bit equivalent binary representation
  • 37. Example 10AF16 = ?2 1 0 A F 0001 0000 1010 1111 10AF16 = 00010000101011112
  • 39. Binary to Octal • Technique – Group bits in threes, starting on right – Convert to octal digits
  • 40. Example 10110101112 = ?8 1 011 010 111 1 3 2 7 10110101112 = 13278
  • 42. Octal to Binary • Technique – Convert each octal digit to a 3-bit equivalent binary representation
  • 43. Example 7058 = ?2 7 0 5 111 000 101 7058 = 1110001012
  • 45. Octal to Hexadecimal • Technique – Use binary as an intermediary
  • 46. Example 10768 = ?16 1 0 7 6 001 000 111 110 2 3 E 10768 = 23E16
  • 48. Hexadecimal to Octal • Technique – Use binary as an intermediary
  • 49. Example 1F0C16 = ?8 1 F 0 C 0001 1111 0000 1100 1 7 4 1 4 1F0C16 = 174148
  • 50. Exercise – Convert ... Don’t use a calculator! Decimal Binary Octal Hexa- decimal 33 1110101 703 1AF Skip answer Answer
  • 52. Exercise – Convert … Decimal Binary Octal Hexa- decimal 33 100001 41 21 117 1110101 165 75 451 111000011 703 1C3 431 110101111 657 1AF Answer
  • 53. Common Powers (1 of 2) • Base 10 Power Preface Symbol 10-12 pico p 10-9 nano n 10-6 micro  10-3 milli m 103 kilo k 106 mega M 109 giga G 1012 tera T Value .000000000001 .000000001 .000001 .001 1000 1000000 1000000000 1000000000000
  • 54. Common Powers (2 of 2) • Base 2 Power Preface Symbol 210 kilo k 220 mega M 230 Giga G Value 1024 1048576 1073741824 • What is the value of “k”, “M”, and “G”? • In computing, particularly w.r.t. memory, the base-2 interpretation generally applies
  • 55. Fractions • Binary to decimal pp. 46-50 10.1011 => 1 x 2-4 = 0.0625 1 x 2-3 = 0.125 0 x 2-2 = 0.0 1 x 2-1 = 0.5 0 x 20 = 0.0 1 x 21 = 2.0 2.6875
  • 56. Fractions • Decimal to binary p. 50 3.14579 .14579 x 2 0.29158 x 2 0.58316 x 2 1.16632 x 2 0.33264 x 2 0.66528 x 2 1.33056 etc. 11.00100
  • 57. Fractions • Hex decimal to decimal: B0. A031 => 1 x 16-4 = 0.0001 3 x 16-3 = 0.0007 0 x 16-2 = 0.0000 10 x 16-1 = 0.6250 0 x 160 = 0.0 11 x 161 =176. 176.6258
  • 58. Fractions • Decimal to Hex Decimal 32.14579 .14579 x 16 2.33264 x 16 5.32224 x 16 5.15584 x 16 2.49344 x 16 7.89504 x 16 14 .32064 etc. 20.25527E
  • 59. Fractions • Octal to decimal: 27.1031 => 1 x 8-4 = 0.0002 3 x 8-3 = 0.005 0 x 8-2 = 0.000 1 x 8-1 = 0.125 7 x 80 = 7. 2 x 81 = 16. 23.1302
  • 60. Fractions • Decimal to Octal 32.14579 .14579 x 8 1.16632 x 8 1.33056 x 8 2.64448 x 8 5.15584 x 8 1.24672 x 8 1 .97376 etc. 40.112511
  • 61. Fractional Binary to Hexa- decimal (a) 11110.010112 Solution: 11110.010112 = 0001 1110 . 0101 1000 = 1E.5816 Therefore, 11110.010112 = 1E.5816
  • 62. Fractional Hexa-decimal to Binary (b) BA2.23C16 Solution: = B A 2 . 2 3 C = 1011 1010 0010 . 0010 0011 11002 = 101110100010.0010001111 Hence the required binary equivalent is 101110100010 . 0010001111.
  • 63. Fractional Binary to Octal (a) 111101.011012 Solution: 111101.0110102 = 75.328 Hence the required octal equivalent is 75.32.
  • 64. Fractional Octal to Binary (b) 64.1758 Solution: = 6 4 . 1 7 5 = 110 100 . 001 111 101 = 110100.0011111012 Hence the required binary number is 110100.001111101.
  • 65. Chapter 1 65 Example: Fractional Octal to Hexadecimal via Binary 1. Convert octal to binary 2. Use groups of four binary bits and express them as hexadecimal digits • Example: Octal  Binary  Hexadecimal (6 3 5 . 1 7 5)8 110 011 101. 001 111 101 000110011101. 001111101000 = (1 9 D . 3 E 8)16 Represent Octal in binary Group into 4 bit groups for both the integer and fraction parts, starting at the radix point Append leading 0’s to the left of integer part and trailing 0’s to the right of the fraction part as needed Express each group of 4 bits in hex Appended 0’s
  • 66. Example: Fractional Hexadecimal to Octal via Binary 1. Convert Hexadecimal to binary 2. Use groups of three binary bits and express them as octal digits • Example: Hexadecimal  Binary  Octal • (6 3 5 . 1 7 5)16 0110 0011 0101. 0001 0111 0101 =011 000 110 101. 000 101 110 101 = (3065.0565)16
  • 67. Exercise – Convert ... Don’t use a calculator! Decimal Binary Octal Hexa- decimal 29.8 101.1101 3.07 C.82 Skip answer Answer
  • 68. Exercise – Convert … Decimal Binary Octal Hexa- decimal 29.8 11101.110011… 35.63… 1D.CC… 5.8125 101.1101 5.64 5.D 3.109375 11.000111 3.07 3.1C 12.5078125 1100.10000010 14.404 C.82 Answer