SlideShare a Scribd company logo
1 of 11
NUMBERING SYSTEM
PREPARED BY
RENATUS KATUNDU
NUMBER SYSTEM ARITHMETIC
Binary Addition
Adding two binary numbers together is easy, keeping in mind the following four addition
rules:
(1) 0 + 0 = 0
(2) 0 + 1 = 1
(3) 1 + 0 = 1
(4) 1 + 1 = 10
Consider the following binary addition problems and note where it is necessary to carry the 1:
Subtraction Using Complements
The operation is carried out by means of the following steps:
(i) At first, 2’s complement of the subtrahend is found.
(ii) Then it is added to the minuend.
(iii) If the final carry-over of the sum is 1, it is dropped and the result is positive.
(iv) If there is no carry over, the two’s complement of the sum will be the result and it is
negative.
The following examples on subtraction by 2’s complement will make the
procedure clear:
Evaluate:
(i) 110110 - 10110
Solution:
The numbers of bits in the subtrahend is 5 while that of minuend is 6. We make the number
of bits in the subtrahend equal to that of minuend by taking a `0’ in the sixth place of the
subtrahend.
Now, 2’s complement of 010110 is (101101 + 1) i.e.101010. Adding this with the minuend.
1 1 0 1 1 0 Minuend
1 0 1 0 1 0 2’s complement of subtrahend
Carry over 1 1 0 0 0 0 0 Result of addition
After dropping the carry-over we get the result of subtraction to be 100000.
(ii) 10110 – 11010
Solution:
2’s complement of 11010 is (00101 + 1) i.e. 00110. Hence
Minued - 1 0 1 1 0
2’s complement of subtrahend - 0 0 1 1 0
Result of addition - 1 1 1 0 0
As there is no carry over, the result of subtraction is negative and is obtained by writing the
2’s complement of 11100 i.e.(00011 + 1) or 00100.
Hence the difference is – 100.
(iii) 1010.11 – 1001.01
Solution:
2’s complement of 1001.01 is 0110.11. Hence
Minued - 1 0 1 0 . 1 1
2’s complement of subtrahend - 0 1 1 0 . 1 1
Carry over 1 0 0 0 1 . 1 0
After dropping the carry-over we get the result of subtraction as 1.10.
(iv) 10100.01 – 11011.10
Solution:
2’s complement of 11011.10 is 00100.10. Hence
Minued - 1 0 1 0 0 . 0 1
2’s complement of subtrahend - 0 1 1 0 0 . 1 0
Result of addition - 1 1 0 0 0 . 1 1
As there is no carry-over, the result of subtraction is negative and is obtained by writing the
2’s complement of 11000.11.
Hence the required result is – 00111.01.
Additional examples:
Octal Addition
Octal addition is performed just like decimal addition, except that if a column of two addends
produces a sum greater than 7, you must subtract 8 from the result, put down that result, and
carry the 1. Remember that there are no such digits as "8" and "9" in the octal system, and that
810 = 108 , 910 = 118, etc.
Evaluate:
(i) (162)8 + (537) 8
Solution:
1 1 <---- carry
1 6 2
5 3 7
7 2 1
Therefore, sum = 7218
(ii) (136) 8 + (636) 8
Solution:
1 <---- carry
1 3 6
6 3 6
7 7 4
Therefore, sum = 7748
(iii) (25.27) 8 + (13.2) 8
Solution:
1 <---- carry
2 5 . 2 7
1 3 . 2
4 0 . 4 7
Therefore, sum = (40.47) 8
(iv) (67.5) 8 + (45.6) 8
Solution:
1 1 <---- carry
6 7 . 5
4 5 . 6
1 3 5 . 3
Therefore, sum = (135.3) 8
Octal Subtraction
We will use the complement method to perform octal subtraction. The steps for subtracting two
octal numbers are as follows:
(1) Compute the seven's complement of the subtrahend by subtracting each digit of the
subtrahend by 7.
(2) Add 1 to the seven's complement of the subtrahend to get the eight's complement of the
subtrahend.
(3) Add the eight's complement of the subtrahend to the minuend and drop the high-order 1. This
is your difference.
The Hexadecimal Number System
The hexadecimal number system uses not only the Arabic numerals 0 through 9, but also uses
the letters A, B, C, D, E, and F to represent the equivalent of 1010 through 1510, respectively.
For reference, the following table shows the decimal numbers 0 through 31 with their
hexadecimal equivalents:
Decimal Hexadecima
l
Decimal Hexadecima
l
0 0 16 10
1 1 17 11
2 2 18 12
3 3 19 13
4 4 20 14
5 5 21 15
6 6 22 16
7 7 23 17
8 8 24 18
9 9 25 19
10 A 26 1A
11 B 27 1B
12 C 28 1C
13 D 29 1D
14 E 30 1E
15 F 31 1F
Hexadecimal Arithmetic
Addition
Evaluate: (B A 3)16 + (5 D E)16
Solution:
We note from the table that
3 + E = 11
A + D = 17
17 + 1 (carry) = 18
B + 5 = 10
10 + 1 (carry) = 11
1 1 carry
B A 3
5 D E
1 1 8 1
Hence the required sum is 1181 in hexadecimal.
Subtraction
Example: (DEA9) 16 - (4FBD)16 =?
Solution
15’s complement of 4FBD is B042 (given by subtracting each hexadecimal digit from 15)
16’s complement of 4FBD is B043 (given by adding 1 to the 15’s complement)
Adding the subtrahend to the minuend, we have:
DEA9
+ B043
1 8EEC
Thus, (DEA9) 16 - (4FBD)16 =(8EEC) 16

More Related Content

What's hot

What's hot (20)

Digital logic mohammed salim ch2
Digital logic mohammed salim ch2Digital logic mohammed salim ch2
Digital logic mohammed salim ch2
 
Arithmetic Logic
Arithmetic LogicArithmetic Logic
Arithmetic Logic
 
Chapter 7 rohith
Chapter 7 rohithChapter 7 rohith
Chapter 7 rohith
 
Complement
ComplementComplement
Complement
 
Two’s complement
Two’s complementTwo’s complement
Two’s complement
 
1s and 2s complement
1s and 2s complement1s and 2s complement
1s and 2s complement
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
EC Binary Substraction using 1's Complement,2's Complement
EC Binary Substraction using 1's Complement,2's ComplementEC Binary Substraction using 1's Complement,2's Complement
EC Binary Substraction using 1's Complement,2's Complement
 
B sc3 unit 2 number system
B sc3  unit 2 number systemB sc3  unit 2 number system
B sc3 unit 2 number system
 
B sc ii sem unit 2(a) ns
B sc ii sem  unit 2(a) nsB sc ii sem  unit 2(a) ns
B sc ii sem unit 2(a) ns
 
Complements of numbers
Complements of numbersComplements of numbers
Complements of numbers
 
Representation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.SivakumarRepresentation of Signed Numbers - R.D.Sivakumar
Representation of Signed Numbers - R.D.Sivakumar
 
1's and 2's complement
1's and 2's complement 1's and 2's complement
1's and 2's complement
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Number systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s compNumber systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s comp
 
Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001a
 
Binary addition
Binary additionBinary addition
Binary addition
 
Number systems r002
Number systems  r002Number systems  r002
Number systems r002
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 
Arithmetic logic units
Arithmetic logic unitsArithmetic logic units
Arithmetic logic units
 

Viewers also liked

Working With Binary Numbers
Working With Binary NumbersWorking With Binary Numbers
Working With Binary Numbersadil raja
 
Math unit7 number system and bases
Math unit7 number system and basesMath unit7 number system and bases
Math unit7 number system and baseseLearningJa
 
Math1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex ConversionMath1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex Conversiongcmath1003
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTMLMarlon Jamera
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTMLDoncho Minkov
 
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 numbersMohammad Bashartullah
 

Viewers also liked (11)

Working With Binary Numbers
Working With Binary NumbersWorking With Binary Numbers
Working With Binary Numbers
 
Math unit7 number system and bases
Math unit7 number system and basesMath unit7 number system and bases
Math unit7 number system and bases
 
Math1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex ConversionMath1003 1.10 - Binary to Hex Conversion
Math1003 1.10 - Binary to Hex Conversion
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Html forms
Html formsHtml forms
Html forms
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Practical File Itm
Practical File ItmPractical File Itm
Practical File Itm
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
2. HTML forms
2. HTML forms2. HTML forms
2. HTML forms
 
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
 
HTML practicals
HTML practicals HTML practicals
HTML practicals
 

Similar to Number system arithmetic

UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptxamudhak10
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptxamudhak10
 
CMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & AlgorithmsCMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & Algorithmsallyn joy calcaben
 
Data representation
Data representationData representation
Data representationChew Hoong
 
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
 
Chapter 6 base_number
Chapter 6 base_numberChapter 6 base_number
Chapter 6 base_numberNazrul Shah
 
Number system
Number systemNumber system
Number systemaviban
 
Logic Design 2009
Logic Design 2009Logic Design 2009
Logic Design 2009lionking
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpuWan Afirah
 
Binary octal
Binary octalBinary octal
Binary octaldrdipo4
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptskatiarrahaman
 
Logic Design - Chapter 1: Number Systems and Codes
Logic Design - Chapter 1: Number Systems and CodesLogic Design - Chapter 1: Number Systems and Codes
Logic Design - Chapter 1: Number Systems and CodesGouda Mando
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.pptRabiaAsif31
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptxsulekhasaxena2
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in indiaEdhole.com
 

Similar to Number system arithmetic (20)

UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
CA UNIT II.pptx
CA UNIT II.pptxCA UNIT II.pptx
CA UNIT II.pptx
 
CMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & AlgorithmsCMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & Algorithms
 
Data representation
Data representationData representation
Data representation
 
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)
 
Chapter 6 base_number
Chapter 6 base_numberChapter 6 base_number
Chapter 6 base_number
 
Ch_10.pptx.pdf
Ch_10.pptx.pdfCh_10.pptx.pdf
Ch_10.pptx.pdf
 
Number system
Number systemNumber system
Number system
 
Logic Design 2009
Logic Design 2009Logic Design 2009
Logic Design 2009
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpu
 
Number system
Number systemNumber system
Number system
 
Binary octal
Binary octalBinary octal
Binary octal
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Logic Design - Chapter 1: Number Systems and Codes
Logic Design - Chapter 1: Number Systems and CodesLogic Design - Chapter 1: Number Systems and Codes
Logic Design - Chapter 1: Number Systems and Codes
 
uyuyuy.pdf
uyuyuy.pdfuyuyuy.pdf
uyuyuy.pdf
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 

Recently uploaded

Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdfKamal Acharya
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsmeharikiros2
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)ChandrakantDivate1
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesChandrakantDivate1
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257subhasishdas79
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...josephjonse
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...ssuserdfc773
 

Recently uploaded (20)

Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 

Number system arithmetic

  • 1. NUMBERING SYSTEM PREPARED BY RENATUS KATUNDU NUMBER SYSTEM ARITHMETIC Binary Addition Adding two binary numbers together is easy, keeping in mind the following four addition rules: (1) 0 + 0 = 0 (2) 0 + 1 = 1 (3) 1 + 0 = 1 (4) 1 + 1 = 10 Consider the following binary addition problems and note where it is necessary to carry the 1:
  • 2. Subtraction Using Complements The operation is carried out by means of the following steps: (i) At first, 2’s complement of the subtrahend is found. (ii) Then it is added to the minuend. (iii) If the final carry-over of the sum is 1, it is dropped and the result is positive. (iv) If there is no carry over, the two’s complement of the sum will be the result and it is negative. The following examples on subtraction by 2’s complement will make the procedure clear: Evaluate: (i) 110110 - 10110 Solution: The numbers of bits in the subtrahend is 5 while that of minuend is 6. We make the number of bits in the subtrahend equal to that of minuend by taking a `0’ in the sixth place of the subtrahend.
  • 3. Now, 2’s complement of 010110 is (101101 + 1) i.e.101010. Adding this with the minuend. 1 1 0 1 1 0 Minuend 1 0 1 0 1 0 2’s complement of subtrahend Carry over 1 1 0 0 0 0 0 Result of addition After dropping the carry-over we get the result of subtraction to be 100000. (ii) 10110 – 11010 Solution: 2’s complement of 11010 is (00101 + 1) i.e. 00110. Hence Minued - 1 0 1 1 0 2’s complement of subtrahend - 0 0 1 1 0 Result of addition - 1 1 1 0 0 As there is no carry over, the result of subtraction is negative and is obtained by writing the 2’s complement of 11100 i.e.(00011 + 1) or 00100. Hence the difference is – 100. (iii) 1010.11 – 1001.01 Solution: 2’s complement of 1001.01 is 0110.11. Hence Minued - 1 0 1 0 . 1 1 2’s complement of subtrahend - 0 1 1 0 . 1 1 Carry over 1 0 0 0 1 . 1 0 After dropping the carry-over we get the result of subtraction as 1.10. (iv) 10100.01 – 11011.10 Solution:
  • 4. 2’s complement of 11011.10 is 00100.10. Hence Minued - 1 0 1 0 0 . 0 1 2’s complement of subtrahend - 0 1 1 0 0 . 1 0 Result of addition - 1 1 0 0 0 . 1 1 As there is no carry-over, the result of subtraction is negative and is obtained by writing the 2’s complement of 11000.11. Hence the required result is – 00111.01. Additional examples:
  • 5.
  • 6. Octal Addition Octal addition is performed just like decimal addition, except that if a column of two addends produces a sum greater than 7, you must subtract 8 from the result, put down that result, and carry the 1. Remember that there are no such digits as "8" and "9" in the octal system, and that 810 = 108 , 910 = 118, etc. Evaluate: (i) (162)8 + (537) 8 Solution: 1 1 <---- carry 1 6 2 5 3 7
  • 7. 7 2 1 Therefore, sum = 7218 (ii) (136) 8 + (636) 8 Solution: 1 <---- carry 1 3 6 6 3 6 7 7 4 Therefore, sum = 7748 (iii) (25.27) 8 + (13.2) 8 Solution: 1 <---- carry 2 5 . 2 7 1 3 . 2 4 0 . 4 7 Therefore, sum = (40.47) 8 (iv) (67.5) 8 + (45.6) 8 Solution: 1 1 <---- carry 6 7 . 5 4 5 . 6 1 3 5 . 3 Therefore, sum = (135.3) 8
  • 8. Octal Subtraction We will use the complement method to perform octal subtraction. The steps for subtracting two octal numbers are as follows: (1) Compute the seven's complement of the subtrahend by subtracting each digit of the subtrahend by 7. (2) Add 1 to the seven's complement of the subtrahend to get the eight's complement of the subtrahend. (3) Add the eight's complement of the subtrahend to the minuend and drop the high-order 1. This is your difference.
  • 9. The Hexadecimal Number System The hexadecimal number system uses not only the Arabic numerals 0 through 9, but also uses the letters A, B, C, D, E, and F to represent the equivalent of 1010 through 1510, respectively. For reference, the following table shows the decimal numbers 0 through 31 with their hexadecimal equivalents:
  • 10. Decimal Hexadecima l Decimal Hexadecima l 0 0 16 10 1 1 17 11 2 2 18 12 3 3 19 13 4 4 20 14 5 5 21 15 6 6 22 16 7 7 23 17 8 8 24 18 9 9 25 19 10 A 26 1A 11 B 27 1B 12 C 28 1C 13 D 29 1D 14 E 30 1E 15 F 31 1F Hexadecimal Arithmetic Addition Evaluate: (B A 3)16 + (5 D E)16 Solution: We note from the table that 3 + E = 11 A + D = 17 17 + 1 (carry) = 18 B + 5 = 10 10 + 1 (carry) = 11 1 1 carry B A 3 5 D E 1 1 8 1 Hence the required sum is 1181 in hexadecimal.
  • 11. Subtraction Example: (DEA9) 16 - (4FBD)16 =? Solution 15’s complement of 4FBD is B042 (given by subtracting each hexadecimal digit from 15) 16’s complement of 4FBD is B043 (given by adding 1 to the 15’s complement) Adding the subtrahend to the minuend, we have: DEA9 + B043 1 8EEC Thus, (DEA9) 16 - (4FBD)16 =(8EEC) 16