SlideShare a Scribd company logo
1 of 52
Download to read offline
CHAPTER 2A
NUMBER SYSTEMS,
OPERATIONS AND CODES
Total Lecture : 3 hours
1
• Number systems to be covered in this subject are :
1. Decimal numbers
2. Binary numbers
3. Hexadecimal numbers
4. Octal numbers
Base 10 numbers
Base 2 numbers
Base 16 numbers
Base 8 numbers
NUMBER SYSTEM
2
Decimal numbers
Binary numbers
Hexadecimal numbers
Octal numbers
• Numbers that consists of
0 or 1.
• Numbers that consists of
0, 1, 2, 3, 4, 5, 6, 7, 8 or 9.
• Numbers that consists of
0, 1, 2, 3, 4, 5, 6 or 7
• Numbers that consists of
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E or F.
NUMBER SYSTEM
3
Question : What kind of number are these ?
(a) 37FF
(b) 981
(c) 675
(d) 100
So, to differentiate among these type of numbers, we usually put certain notation.
(Binary? Decimal? Octal? Hexadecimal?)
(Binary? Decimal? Octal? Hexadecimal?)
(Binary? Decimal? Octal? Hexadecimal?)
(Binary? Decimal? Octal? Hexadecimal?)
In any number system, the rightmost digit is called as LSD and the leftmost digit is called MSD.
NUMBER SYSTEM
4
This number system is what we are using in our daily life.
Each position in decimal number has its own weight !!!
…. 104 103 102 101 100 . 10-1 10-2 10-3 ….
For example, let say we have a five digit number such as 568.23
The digit 5 represents 500
The digit 6 represents 60
The digit 8 represents 8
The digit 2 represents 0.2
The digit 3 represents 0.03
NUMBER SYSTEM
DECIMAL NUMBERS (BASE 10)
5
• Utilize two numbers only, 0 and 1
• There are 3 types of binary numbers :
(a) True binary @ straight binary @ direct binary
(b) 1’s complement
(c) 2’s complement
To be discussed
later in detail
• The weight structure of a true binary number is
2n-1 …. 24 23 22 21 20 . 2-1 2-2 2-3 …. 2-n
where n = number of bits
NUMBER SYSTEM
BINARY NUMBERS (BASE 2)
6
Example : Convert the true binary number of 11011012 to decimal
Solution :
Weight : 24 23 22 21
26 25 20
Binary number : 0 1 1 0
1 1 1
(1x26) + (1x25) + (0x24) + (1x23) + (1x22) + (0x21) + (1x20)
Decimal number :
= 10910
TIPS
To memorize the weight of true binary, you can try this !!
……. 512 256 128 64 32 16 8 4 2 1
NUMBER SYSTEM
TRUE BINARY – TO – DECIMAL CONVERSION
7
Example : Convert the true binary number of 0.10112 to decimal
Solution :
Weight : 2-3 24
2-1 2-2
Binary number : 0 1
.1 1
(1 x 2-1) + (1 x 2-2) + (0 x 2-3) + (1 x 2-4)
Decimal number :
= 0.687510
NUMBER SYSTEM
TRUE BINARY – TO – DECIMAL CONVERSION
8
Example : Convert the true binary number of 10111101.0112 to decimal
Solution :
27 26 25 24 23 22 21 20 . 2-1 2-2 2-3
Weight :
1 0 1 1 1 1 0 1 . 0 1 1
Binary number :
Decimal number :
NUMBER SYSTEM
TRUE BINARY – TO – DECIMAL CONVERSION
9
Example :
What is the largest decimal number that can be represented by in true binary with eight bits ?
Solution :
Weight :
(for 8 bits)
27 26 25 24 23 22 21 20
(128) (64) (32) (16) (8) (4) (2) (1)
Binary number :
Decimal number :
NUMBER SYSTEM
TRUE BINARY – TO – DECIMAL CONVERSION
10
There are several methods:
1. Sum – of – Weights method
2. Repeated Division – by – 2 method
3. Repeated Multiplication – by – 2 method
for whole number
for fractional number
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
11
Example : Convert decimal number of 8210 to true binary using sum-of-weights method.
Solution :
Weight :
(1)
20
(2)
21
(4)
22
(8)
23
(16)
24
(32)
25
(64)
26
(128)
27
Binary number :
Decimal number : = 82
8210 010100102
Decimal True binary
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
12
Example :
Convert the following decimal number to true binary using sum-of-weights
method.
(a) 1210 (b) 2510 (c) 5510
Solution :
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
13
Example :
Convert the following decimal number to true binary using sum-of-weights
method.
(a) 0.812510 (b) 45.7510
Solution :
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
14
Example : Complete the following table
Decimal number True binary number
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
15
Example :
Convert decimal number of
1910 to true binary using
repeated division-by-2 method.
Solution : 19 ÷ 2 = 9 with remainder 1
9 ÷ 2 = 4 with remainder 1
4 ÷ 2 = 2 with remainder 0
2 ÷ 2 = 1 with remainder 0
1 ÷ 2 = 0 with remainder 1
Binary number : 1 0 0 1 1
1910 100112
Decimal True binary
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
16
Example :
Convert the following decimal number to true binary using repeated
division-by-2 method.
(a) 4510 (b) 3910
Solution :
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
17
Example :
Convert decimal number of 0.312510
to true binary using repeated
multiplication-by-2 method.
Solution :
0.3125 x 2 = 0.625 with carry 0
0.625 x 2 = 1.25 with carry 1
0.25 x 2 = 0.50 with carry 0
0.5 x 2 = 1.0 with carry 1
1 0 1
0
.
Binary number :
0.312510 .01012
Decimal True binary
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
18
Example : Convert decimal number of 0.82812510 to true binary using repeated multiplication-by-2 method.
Solution :
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
19
Example :
Convert decimal number of 22.5937510
to true binary using repeated division
and repeated multiplication.
Solution :
22.59375 = 22 + 0.59375
Use repeated
division
Use repeated
multiplication
1 0 1 1 0 0 .1 0 0 1 1
22.5937510 101100.100112
Decimal True binary
NUMBER SYSTEM
DECIMAL – TO - TRUE BINARY CONVERSION
20
• The weight of a hexadecimal number is
…. 164 163 162 161 160
65536 4096 256 16 1
• Composed of 16 characters (10 numeric characters and 6 alphabetic characters)
• Numeric characters : 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9
• Alphabetic characters : A, B, C, D, E and F
NUMBER SYSTEM
HEXADECIMAL NUMBERS (BASE 16)
21
Example: Convert true binary number of 11001010010101112 to hexadecimal
Solution :
Binary number : 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 1
Weight :
(1)
20
(2)
21
(4)
22
(8)
23
Hexadecimal number :
(1)
20
(2)
21
(4)
22
(8)
23
(1)
20
(2)
21
(4)
22
(8)
23
(1)
20
(2)
21
(4)
22
(8)
23
7
C A 5
11001010010101112 CA5716
True binary Hexadecimal
NUMBER SYSTEM
TRUE BINARY – TO – HEXADECIMAL CONVERSION
22
Example : Convert the following true binary number to hexadecimal.
(a) 1111110001011010012
(b) 10011110111100111002
NUMBER SYSTEM
TRUE BINARY – TO – HEXADECIMAL CONVERSION
23
Hexadecimal – to – true binary conversion
Example : Convert hexadecimal number of 10A416 to true binary.
Solution :
Binary number :
Weight :
Hexadecimal number :
(1)
20
(2)
21
(4)
22
(8)
23
(1)
20
(2)
21
(4)
22
(8)
23
(1)
20
(2)
21
(4)
22
(8)
23
(1)
20
(2)
21
(4)
22
(8)
23
4
1 0 A
10A416 00010000101001002
Hexadecimal True binary
0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0
NUMBER SYSTEM
HEXADECIMAL – TO - TRUE BINARY CONVERSION
24
Example : Convert the following hexadecimal number to true binary.
(a) CF8E16 (b) 974216 (c) 6BD316
NUMBER SYSTEM
HEXADECIMAL – TO - TRUE BINARY CONVERSION
25
Example : Convert hexadecimal number of A8516 to decimal.
Solution :
Hexadecimal number : A 8 5
(1)
160
(16)
161
(256)
162
Weight :
Decimal number : (A x 256) + (8 x 16) + (5 x 1)
= (10 x 256) + (8 x 16) + (5 x 1)
= 269310
A8516 269310
Hexadecimal Decimal
* Alternatively, you could convert hexadecimal to true binary, then true binary to decimal.
NUMBER SYSTEM
HEXADECIMAL – TO – DECIMAL CONVERSION
26
Example :
Convert the following hexadecimal number to decimal.
(a) 6BD16 (b) E516 (c) B2F816 (d) 60A16
NUMBER SYSTEM
HEXADECIMAL – TO – DECIMAL CONVERSION
27
Several methods can be used to perform this conversion.
1. Sum – of – Weights method
2. Repeated division – by – 16 method
Example : Convert decimal number of 65010 to hexadecimal using sum – of – weights method.
Solution :
Hexadecimal number :
(1)
160
(16)
161
(256)
162
Weight :
Decimal number : = 650
( x 256) + ( x 16) + ( x 1)
65010 28A16
Decimal Hexadecimal
2
2
512
8
8
+ 128
A
A
+ 10
NUMBER SYSTEM
DECIMAL – TO – HEXADECIMAL CONVERSION
28
Example : Convert decimal number of 65010 to hexadecimal
using repeated division – by – 16 method.
Solution :
650 ÷ 16 = 40 with remainder 10
40 ÷ 16 = 2 with remainder 8
2 ÷ 16 = 0 with remainder 2
Hexadecimal number : 2 8 A
65010 28A16
Decimal Hexadecimal
NUMBER SYSTEM
DECIMAL – TO – HEXADECIMAL CONVERSION
29
Example : Convert decimal number of 259110 to hexadecimal using
(a) sum – of – weights method
(b) repeated division – by – 16 method
Solution :
(a) Sum – of – weights method
Hexadecimal number :
(1)
160
(16)
161
(256)
162
Weight :
Decimal number : = 2591
( x 256) + ( x 16) + ( x 1)
A
A
2560
1
1
+ 16
F
F
+ 15
259110 A1F16
Decimal Hexadecimal
NUMBER SYSTEM
DECIMAL – TO – HEXADECIMAL CONVERSION
30
Example : Convert decimal number of 259110 to hexadecimal using
(a) sum – of – weights method
(b) repeated division – by – 16 method
Solution :
(b) Repeated division – by – 16 method
2591 ÷ 16 = 161 with remainder 15
161 ÷ 16 = 10 with remainder 1
10 ÷ 16 = 0 with remainder 10
Hexadecimal number : A 1 F
259110 A1F16
Decimal Hexadecimal
NUMBER SYSTEM
DECIMAL – TO – HEXADECIMAL CONVERSION
31
• The weight of a octal number is
…. 84 83 82 81 80
4096 512 64 8 1
• Composed of eight digits.
• The digits are 0, 1, 2, 3, 4, 5, 6 and 7
NUMBER SYSTEM
OCTAL NUMBERS (BASE 8)
32
Example : Convert octal number of 23748 to decimal.
Solution :
Octal number : 2 3 7 4
(8)
81
(64)
82
(512)
83
Weight :
Decimal number : (2 x 512) + (3 x 64) + (7 x 8) + (4 x 1)
= 127610
23748 127610
Octal Decimal
(1)
80
NUMBER SYSTEM
OCTAL – TO – DECIMAL CONVERSION
33
Example :
Convert the following octal number to decimal.
(a) 738
(b) 1258
NUMBER SYSTEM
OCTAL – TO – DECIMAL CONVERSION
34
Can be performed by using sum – of – weights method or repeated division by 8 method.
Example : Convert decimal number of 35910 to octal by using
(a) Sum – of – weights method
(b) Repeated division by 8 method
Solution :
(a) Sum – of – weights method
Octal number :
(1)
80
(8)
81
(64)
82
Weight :
Decimal number : = 359
( x 64) + ( x 8) + ( x 1)
35910 5478
Decimal Octal
5
5
320
4
4
+ 32
7
7
+ 7
NUMBER SYSTEM
DECIMAL – TO – OCTAL CONVERSION
35
Can be performed by using sum – of – weights method or repeated division by 8 method.
Example : Convert decimal number of 35910 to octal by using
(a) Sum – of – weights method
(b) Repeated division by 8 method
Solution :
(b) Repeated division by 8 method
359 ÷ 8 = 44 with remainder 7
44 ÷ 8 = 5 with remainder 4
5 ÷ 8 = 0 with remainder 5
Octal number : 5 4 7
35910 5478
Decimal Octal
NUMBER SYSTEM
DECIMAL – TO – OCTAL CONVERSION
36
Example :
Convert the following decimal numbers to octal.
(a) 9810 (b) 16310
NUMBER SYSTEM
DECIMAL – TO – OCTAL CONVERSION
37
Example : Convert binary number of 110100001002 to octal.
Solution :
Binary number : 1 1 0 1 0 0 0 0 1 0 0
Weight :
Octal number :
(1)
20
(2)
21
(4)
22
(1)
20
(2)
21
(4)
22
(1)
20
(2)
21
(4)
22
4
3 2 0
110100001002 32048
True binary Octal
(1)
20
(2)
21
NUMBER SYSTEM
BINARY – TO – OCTAL CONVERSION
38
Example :
Convert the following binary number to octal.
(a) 1101012
(b) 1011110012
(c) 1001100110102
NUMBER SYSTEM
BINARY – TO – OCTAL CONVERSION
39
Example: Convert octal number of 75268 to binary.
Solution :
Binary number :
Weight :
Octal number :
(1)
20
(2)
21
(4)
22
6
7 5 2
75268 1111010101102
Octal Binary
1 1 1 0 1 0 1 1 0
1 0 1
(1)
20
(2)
21
(4)
22
(1)
20
(2)
21
(4)
22
(1)
20
(2)
21
(4)
22
NUMBER SYSTEM
OCTAL – TO – BINARY CONVERSION
40
Example:
Convert the following octal numbers to binary
(a) 138
(b) 258
(c) 1408
NUMBER SYSTEM
OCTAL – TO – BINARY CONVERSION
41
Used to perform mathematical operation in digital system.
Four basic binary arithmetic operation :
1. Binary addition
2. Binary subtraction
3. Binary multiplication
4. Binary division
NUMBER SYSTEM
BINARY ARITHMETIC
42
Rules for binary addition :
0 + 0 = 0 Sum, Σ = 0 with Carry, C = 0
0 + 1 = 1 Sum, Σ = 1 with Carry, C = 0
1 + 0 = 1 Sum, Σ = 1 with Carry, C = 0
1 + 1 = 10 Sum, Σ = 0 with Carry, C = 1
NUMBER SYSTEM
BINARY ADDITION
43
Example
Add the following binary numbers :
(a) 112 + 112
(b) 1002 + 102
(c) 1112 + 112
(d) 1102 + 1002
(e) 11112 + 11002
Answer : (a) 1102 (b) 1102 (c) 10102 (d) 10102 (e) 110112
NUMBER SYSTEM
BINARY ADDITION
44
Rules for binary subtraction :
0 – 0 = 0
1 – 1 = 0
1 – 0 = 1
10 – 1 = 1 With a borrow of 1
NUMBER SYSTEM
BINARY SUBTRACTION
45
Example
Perform the following binary subtractions :
(a) 112 – 012
(b) 112 – 102
(c) 1112 – 1002
Answer : (a) 102 (b) 012 (c) 112
NUMBER SYSTEM
BINARY SUBTRACTION
46
Example
(a) Subtract 0112 from 1012.
(b) Subtract 1012 from 1102.
Answer : (a) 0102 (b) 12
NUMBER SYSTEM
BINARY SUBTRACTION
47
Rules for binary multiplication :
0 x 0 = 0
0 x 1 = 0
1 x 0 = 0
1 x 1 = 1
NUMBER SYSTEM
BINARY MULTIPLICATION
48
Example
Perform the following binary multiplications.
(a) 112 x 112
(b) 1012 x 1112
(c) 11012 x 10102
Answer : (a) 10012 (b) 1000112 (c) 100000102
NUMBER SYSTEM
BINARY MULTIPLICATION
49
Example
Perform the following binary divisions.
(a) 1102 ÷ 112
(b) 1102 ÷ 102
(c) 11002 ÷ 1002
Answer : (a) 102 (b) 112 (c) 112
NUMBER SYSTEM
BINARY DIVISION
50
Exercise
(a) 11012 + 10102
(b) 101112 + 011012
(c) 11012 – 01002
(d) 10012 – 01112
(e) 1102 x 1112
(f) 11002 ÷ 0112
NUMBER SYSTEM
51
52
SUMMARY
NUMBER SYSTEM Decimal Binary Octal Hexadecimal
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
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
16
17
1111
10000
10001
17
20
21
F
10
11

More Related Content

Similar to Number Systems and Conversions

DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxMamataAnilgod
 
Conversion of number system with base concept
Conversion of number system with base conceptConversion of number system with base concept
Conversion of number system with base conceptUniversity of Potsdam
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...Arti Parab Academics
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptxODAATUBE1
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Frankie Jones
 
Number system and conversions between different number systems
Number system and conversions between different number systemsNumber system and conversions between different number systems
Number system and conversions between different number systemswafaashalash
 
Lecture 02 - Logic Design(Number Systems).pptx
Lecture 02 - Logic Design(Number Systems).pptxLecture 02 - Logic Design(Number Systems).pptx
Lecture 02 - Logic Design(Number Systems).pptxshwan it
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1Deepak John
 
More on number system
More on number systemMore on number system
More on number systemsamina khan
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notesKurenai Ryu
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversionRam Pratap Singh
 
01.number systems
01.number systems01.number systems
01.number systemsrasha3
 

Similar to Number Systems and Conversions (20)

DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptx
 
Conversion of number system with base concept
Conversion of number system with base conceptConversion of number system with base concept
Conversion of number system with base concept
 
2013 1
2013 1 2013 1
2013 1
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
 
Chapter two FHI.pptx
Chapter two FHI.pptxChapter two FHI.pptx
Chapter two FHI.pptx
 
Computer Number System
Computer Number SystemComputer Number System
Computer Number System
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)
 
Number system and conversions between different number systems
Number system and conversions between different number systemsNumber system and conversions between different number systems
Number system and conversions between different number systems
 
Lecture 02 - Logic Design(Number Systems).pptx
Lecture 02 - Logic Design(Number Systems).pptxLecture 02 - Logic Design(Number Systems).pptx
Lecture 02 - Logic Design(Number Systems).pptx
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
 
More on number system
More on number systemMore on number system
More on number system
 
DCF QNA edited
DCF QNA editedDCF QNA edited
DCF QNA edited
 
Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
 
Unit 4.docx
Unit 4.docxUnit 4.docx
Unit 4.docx
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notes
 
Number system
Number systemNumber system
Number system
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversion
 
Number system
Number systemNumber system
Number system
 
01.number systems
01.number systems01.number systems
01.number systems
 

Recently uploaded

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 

Number Systems and Conversions

  • 1. CHAPTER 2A NUMBER SYSTEMS, OPERATIONS AND CODES Total Lecture : 3 hours 1
  • 2. • Number systems to be covered in this subject are : 1. Decimal numbers 2. Binary numbers 3. Hexadecimal numbers 4. Octal numbers Base 10 numbers Base 2 numbers Base 16 numbers Base 8 numbers NUMBER SYSTEM 2
  • 3. Decimal numbers Binary numbers Hexadecimal numbers Octal numbers • Numbers that consists of 0 or 1. • Numbers that consists of 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9. • Numbers that consists of 0, 1, 2, 3, 4, 5, 6 or 7 • Numbers that consists of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E or F. NUMBER SYSTEM 3
  • 4. Question : What kind of number are these ? (a) 37FF (b) 981 (c) 675 (d) 100 So, to differentiate among these type of numbers, we usually put certain notation. (Binary? Decimal? Octal? Hexadecimal?) (Binary? Decimal? Octal? Hexadecimal?) (Binary? Decimal? Octal? Hexadecimal?) (Binary? Decimal? Octal? Hexadecimal?) In any number system, the rightmost digit is called as LSD and the leftmost digit is called MSD. NUMBER SYSTEM 4
  • 5. This number system is what we are using in our daily life. Each position in decimal number has its own weight !!! …. 104 103 102 101 100 . 10-1 10-2 10-3 …. For example, let say we have a five digit number such as 568.23 The digit 5 represents 500 The digit 6 represents 60 The digit 8 represents 8 The digit 2 represents 0.2 The digit 3 represents 0.03 NUMBER SYSTEM DECIMAL NUMBERS (BASE 10) 5
  • 6. • Utilize two numbers only, 0 and 1 • There are 3 types of binary numbers : (a) True binary @ straight binary @ direct binary (b) 1’s complement (c) 2’s complement To be discussed later in detail • The weight structure of a true binary number is 2n-1 …. 24 23 22 21 20 . 2-1 2-2 2-3 …. 2-n where n = number of bits NUMBER SYSTEM BINARY NUMBERS (BASE 2) 6
  • 7. Example : Convert the true binary number of 11011012 to decimal Solution : Weight : 24 23 22 21 26 25 20 Binary number : 0 1 1 0 1 1 1 (1x26) + (1x25) + (0x24) + (1x23) + (1x22) + (0x21) + (1x20) Decimal number : = 10910 TIPS To memorize the weight of true binary, you can try this !! ……. 512 256 128 64 32 16 8 4 2 1 NUMBER SYSTEM TRUE BINARY – TO – DECIMAL CONVERSION 7
  • 8. Example : Convert the true binary number of 0.10112 to decimal Solution : Weight : 2-3 24 2-1 2-2 Binary number : 0 1 .1 1 (1 x 2-1) + (1 x 2-2) + (0 x 2-3) + (1 x 2-4) Decimal number : = 0.687510 NUMBER SYSTEM TRUE BINARY – TO – DECIMAL CONVERSION 8
  • 9. Example : Convert the true binary number of 10111101.0112 to decimal Solution : 27 26 25 24 23 22 21 20 . 2-1 2-2 2-3 Weight : 1 0 1 1 1 1 0 1 . 0 1 1 Binary number : Decimal number : NUMBER SYSTEM TRUE BINARY – TO – DECIMAL CONVERSION 9
  • 10. Example : What is the largest decimal number that can be represented by in true binary with eight bits ? Solution : Weight : (for 8 bits) 27 26 25 24 23 22 21 20 (128) (64) (32) (16) (8) (4) (2) (1) Binary number : Decimal number : NUMBER SYSTEM TRUE BINARY – TO – DECIMAL CONVERSION 10
  • 11. There are several methods: 1. Sum – of – Weights method 2. Repeated Division – by – 2 method 3. Repeated Multiplication – by – 2 method for whole number for fractional number NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 11
  • 12. Example : Convert decimal number of 8210 to true binary using sum-of-weights method. Solution : Weight : (1) 20 (2) 21 (4) 22 (8) 23 (16) 24 (32) 25 (64) 26 (128) 27 Binary number : Decimal number : = 82 8210 010100102 Decimal True binary NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 12
  • 13. Example : Convert the following decimal number to true binary using sum-of-weights method. (a) 1210 (b) 2510 (c) 5510 Solution : NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 13
  • 14. Example : Convert the following decimal number to true binary using sum-of-weights method. (a) 0.812510 (b) 45.7510 Solution : NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 14
  • 15. Example : Complete the following table Decimal number True binary number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 15
  • 16. Example : Convert decimal number of 1910 to true binary using repeated division-by-2 method. Solution : 19 ÷ 2 = 9 with remainder 1 9 ÷ 2 = 4 with remainder 1 4 ÷ 2 = 2 with remainder 0 2 ÷ 2 = 1 with remainder 0 1 ÷ 2 = 0 with remainder 1 Binary number : 1 0 0 1 1 1910 100112 Decimal True binary NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 16
  • 17. Example : Convert the following decimal number to true binary using repeated division-by-2 method. (a) 4510 (b) 3910 Solution : NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 17
  • 18. Example : Convert decimal number of 0.312510 to true binary using repeated multiplication-by-2 method. Solution : 0.3125 x 2 = 0.625 with carry 0 0.625 x 2 = 1.25 with carry 1 0.25 x 2 = 0.50 with carry 0 0.5 x 2 = 1.0 with carry 1 1 0 1 0 . Binary number : 0.312510 .01012 Decimal True binary NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 18
  • 19. Example : Convert decimal number of 0.82812510 to true binary using repeated multiplication-by-2 method. Solution : NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 19
  • 20. Example : Convert decimal number of 22.5937510 to true binary using repeated division and repeated multiplication. Solution : 22.59375 = 22 + 0.59375 Use repeated division Use repeated multiplication 1 0 1 1 0 0 .1 0 0 1 1 22.5937510 101100.100112 Decimal True binary NUMBER SYSTEM DECIMAL – TO - TRUE BINARY CONVERSION 20
  • 21. • The weight of a hexadecimal number is …. 164 163 162 161 160 65536 4096 256 16 1 • Composed of 16 characters (10 numeric characters and 6 alphabetic characters) • Numeric characters : 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 • Alphabetic characters : A, B, C, D, E and F NUMBER SYSTEM HEXADECIMAL NUMBERS (BASE 16) 21
  • 22. Example: Convert true binary number of 11001010010101112 to hexadecimal Solution : Binary number : 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 1 Weight : (1) 20 (2) 21 (4) 22 (8) 23 Hexadecimal number : (1) 20 (2) 21 (4) 22 (8) 23 (1) 20 (2) 21 (4) 22 (8) 23 (1) 20 (2) 21 (4) 22 (8) 23 7 C A 5 11001010010101112 CA5716 True binary Hexadecimal NUMBER SYSTEM TRUE BINARY – TO – HEXADECIMAL CONVERSION 22
  • 23. Example : Convert the following true binary number to hexadecimal. (a) 1111110001011010012 (b) 10011110111100111002 NUMBER SYSTEM TRUE BINARY – TO – HEXADECIMAL CONVERSION 23
  • 24. Hexadecimal – to – true binary conversion Example : Convert hexadecimal number of 10A416 to true binary. Solution : Binary number : Weight : Hexadecimal number : (1) 20 (2) 21 (4) 22 (8) 23 (1) 20 (2) 21 (4) 22 (8) 23 (1) 20 (2) 21 (4) 22 (8) 23 (1) 20 (2) 21 (4) 22 (8) 23 4 1 0 A 10A416 00010000101001002 Hexadecimal True binary 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 NUMBER SYSTEM HEXADECIMAL – TO - TRUE BINARY CONVERSION 24
  • 25. Example : Convert the following hexadecimal number to true binary. (a) CF8E16 (b) 974216 (c) 6BD316 NUMBER SYSTEM HEXADECIMAL – TO - TRUE BINARY CONVERSION 25
  • 26. Example : Convert hexadecimal number of A8516 to decimal. Solution : Hexadecimal number : A 8 5 (1) 160 (16) 161 (256) 162 Weight : Decimal number : (A x 256) + (8 x 16) + (5 x 1) = (10 x 256) + (8 x 16) + (5 x 1) = 269310 A8516 269310 Hexadecimal Decimal * Alternatively, you could convert hexadecimal to true binary, then true binary to decimal. NUMBER SYSTEM HEXADECIMAL – TO – DECIMAL CONVERSION 26
  • 27. Example : Convert the following hexadecimal number to decimal. (a) 6BD16 (b) E516 (c) B2F816 (d) 60A16 NUMBER SYSTEM HEXADECIMAL – TO – DECIMAL CONVERSION 27
  • 28. Several methods can be used to perform this conversion. 1. Sum – of – Weights method 2. Repeated division – by – 16 method Example : Convert decimal number of 65010 to hexadecimal using sum – of – weights method. Solution : Hexadecimal number : (1) 160 (16) 161 (256) 162 Weight : Decimal number : = 650 ( x 256) + ( x 16) + ( x 1) 65010 28A16 Decimal Hexadecimal 2 2 512 8 8 + 128 A A + 10 NUMBER SYSTEM DECIMAL – TO – HEXADECIMAL CONVERSION 28
  • 29. Example : Convert decimal number of 65010 to hexadecimal using repeated division – by – 16 method. Solution : 650 ÷ 16 = 40 with remainder 10 40 ÷ 16 = 2 with remainder 8 2 ÷ 16 = 0 with remainder 2 Hexadecimal number : 2 8 A 65010 28A16 Decimal Hexadecimal NUMBER SYSTEM DECIMAL – TO – HEXADECIMAL CONVERSION 29
  • 30. Example : Convert decimal number of 259110 to hexadecimal using (a) sum – of – weights method (b) repeated division – by – 16 method Solution : (a) Sum – of – weights method Hexadecimal number : (1) 160 (16) 161 (256) 162 Weight : Decimal number : = 2591 ( x 256) + ( x 16) + ( x 1) A A 2560 1 1 + 16 F F + 15 259110 A1F16 Decimal Hexadecimal NUMBER SYSTEM DECIMAL – TO – HEXADECIMAL CONVERSION 30
  • 31. Example : Convert decimal number of 259110 to hexadecimal using (a) sum – of – weights method (b) repeated division – by – 16 method Solution : (b) Repeated division – by – 16 method 2591 ÷ 16 = 161 with remainder 15 161 ÷ 16 = 10 with remainder 1 10 ÷ 16 = 0 with remainder 10 Hexadecimal number : A 1 F 259110 A1F16 Decimal Hexadecimal NUMBER SYSTEM DECIMAL – TO – HEXADECIMAL CONVERSION 31
  • 32. • The weight of a octal number is …. 84 83 82 81 80 4096 512 64 8 1 • Composed of eight digits. • The digits are 0, 1, 2, 3, 4, 5, 6 and 7 NUMBER SYSTEM OCTAL NUMBERS (BASE 8) 32
  • 33. Example : Convert octal number of 23748 to decimal. Solution : Octal number : 2 3 7 4 (8) 81 (64) 82 (512) 83 Weight : Decimal number : (2 x 512) + (3 x 64) + (7 x 8) + (4 x 1) = 127610 23748 127610 Octal Decimal (1) 80 NUMBER SYSTEM OCTAL – TO – DECIMAL CONVERSION 33
  • 34. Example : Convert the following octal number to decimal. (a) 738 (b) 1258 NUMBER SYSTEM OCTAL – TO – DECIMAL CONVERSION 34
  • 35. Can be performed by using sum – of – weights method or repeated division by 8 method. Example : Convert decimal number of 35910 to octal by using (a) Sum – of – weights method (b) Repeated division by 8 method Solution : (a) Sum – of – weights method Octal number : (1) 80 (8) 81 (64) 82 Weight : Decimal number : = 359 ( x 64) + ( x 8) + ( x 1) 35910 5478 Decimal Octal 5 5 320 4 4 + 32 7 7 + 7 NUMBER SYSTEM DECIMAL – TO – OCTAL CONVERSION 35
  • 36. Can be performed by using sum – of – weights method or repeated division by 8 method. Example : Convert decimal number of 35910 to octal by using (a) Sum – of – weights method (b) Repeated division by 8 method Solution : (b) Repeated division by 8 method 359 ÷ 8 = 44 with remainder 7 44 ÷ 8 = 5 with remainder 4 5 ÷ 8 = 0 with remainder 5 Octal number : 5 4 7 35910 5478 Decimal Octal NUMBER SYSTEM DECIMAL – TO – OCTAL CONVERSION 36
  • 37. Example : Convert the following decimal numbers to octal. (a) 9810 (b) 16310 NUMBER SYSTEM DECIMAL – TO – OCTAL CONVERSION 37
  • 38. Example : Convert binary number of 110100001002 to octal. Solution : Binary number : 1 1 0 1 0 0 0 0 1 0 0 Weight : Octal number : (1) 20 (2) 21 (4) 22 (1) 20 (2) 21 (4) 22 (1) 20 (2) 21 (4) 22 4 3 2 0 110100001002 32048 True binary Octal (1) 20 (2) 21 NUMBER SYSTEM BINARY – TO – OCTAL CONVERSION 38
  • 39. Example : Convert the following binary number to octal. (a) 1101012 (b) 1011110012 (c) 1001100110102 NUMBER SYSTEM BINARY – TO – OCTAL CONVERSION 39
  • 40. Example: Convert octal number of 75268 to binary. Solution : Binary number : Weight : Octal number : (1) 20 (2) 21 (4) 22 6 7 5 2 75268 1111010101102 Octal Binary 1 1 1 0 1 0 1 1 0 1 0 1 (1) 20 (2) 21 (4) 22 (1) 20 (2) 21 (4) 22 (1) 20 (2) 21 (4) 22 NUMBER SYSTEM OCTAL – TO – BINARY CONVERSION 40
  • 41. Example: Convert the following octal numbers to binary (a) 138 (b) 258 (c) 1408 NUMBER SYSTEM OCTAL – TO – BINARY CONVERSION 41
  • 42. Used to perform mathematical operation in digital system. Four basic binary arithmetic operation : 1. Binary addition 2. Binary subtraction 3. Binary multiplication 4. Binary division NUMBER SYSTEM BINARY ARITHMETIC 42
  • 43. Rules for binary addition : 0 + 0 = 0 Sum, Σ = 0 with Carry, C = 0 0 + 1 = 1 Sum, Σ = 1 with Carry, C = 0 1 + 0 = 1 Sum, Σ = 1 with Carry, C = 0 1 + 1 = 10 Sum, Σ = 0 with Carry, C = 1 NUMBER SYSTEM BINARY ADDITION 43
  • 44. Example Add the following binary numbers : (a) 112 + 112 (b) 1002 + 102 (c) 1112 + 112 (d) 1102 + 1002 (e) 11112 + 11002 Answer : (a) 1102 (b) 1102 (c) 10102 (d) 10102 (e) 110112 NUMBER SYSTEM BINARY ADDITION 44
  • 45. Rules for binary subtraction : 0 – 0 = 0 1 – 1 = 0 1 – 0 = 1 10 – 1 = 1 With a borrow of 1 NUMBER SYSTEM BINARY SUBTRACTION 45
  • 46. Example Perform the following binary subtractions : (a) 112 – 012 (b) 112 – 102 (c) 1112 – 1002 Answer : (a) 102 (b) 012 (c) 112 NUMBER SYSTEM BINARY SUBTRACTION 46
  • 47. Example (a) Subtract 0112 from 1012. (b) Subtract 1012 from 1102. Answer : (a) 0102 (b) 12 NUMBER SYSTEM BINARY SUBTRACTION 47
  • 48. Rules for binary multiplication : 0 x 0 = 0 0 x 1 = 0 1 x 0 = 0 1 x 1 = 1 NUMBER SYSTEM BINARY MULTIPLICATION 48
  • 49. Example Perform the following binary multiplications. (a) 112 x 112 (b) 1012 x 1112 (c) 11012 x 10102 Answer : (a) 10012 (b) 1000112 (c) 100000102 NUMBER SYSTEM BINARY MULTIPLICATION 49
  • 50. Example Perform the following binary divisions. (a) 1102 ÷ 112 (b) 1102 ÷ 102 (c) 11002 ÷ 1002 Answer : (a) 102 (b) 112 (c) 112 NUMBER SYSTEM BINARY DIVISION 50
  • 51. Exercise (a) 11012 + 10102 (b) 101112 + 011012 (c) 11012 – 01002 (d) 10012 – 01112 (e) 1102 x 1112 (f) 11002 ÷ 0112 NUMBER SYSTEM 51
  • 52. 52 SUMMARY NUMBER SYSTEM Decimal Binary Octal Hexadecimal 0 0000 0 0 1 0001 1 1 2 0010 2 2 3 0011 3 3 4 0100 4 4 5 0101 5 5 6 0110 6 6 7 0111 7 7 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 16 17 1111 10000 10001 17 20 21 F 10 11