SlideShare a Scribd company logo
1 of 16
Download to read offline
CHAPTER - 2
BINARY ARITHMETIC
BINARY ADDITION
• Four most basic cases of binary addition
• Column-by-column addition applies to binary as well as decimal
numbers.
• Start by adding the least-significant column.
• Example 1:
Example 2: Add these 8-bit numbers: 0101 0111 and 0011 0101. Then,
show the same numbers in hexadecimal notation.
• Expressed in hexadecimal numbers, the foregoing addition is,
BINARY SUBTRACTION
• Four most basic cases of binary Subtraction
• Subtract column by column, the same as you do with decimal numbers.
• Start by subtracting the least-significant column.
• To subtract the bits of the second column, you may borrow from the
next-higher column.
• Example 1 :
Show the binary subtraction of (125)10 from
(200)10.
UNSIGNED BINARY NUMBERS
• In unsigned binary numbers all of the bits are used to represent the
magnitude of the corresponding decimal number. we can add and
subtract unsigned binary numbers, provided certain conditions are
satisfied.
Limits
• With 8-bit unsigned arithmetic, all magnitudes must be between 0 and
255. Therefore, each number being added or subtracted must be
between 0 and 255. Also, the answer must fall in the range of 0 to 255. If
any magnitudes are greater than 255, we should use 16-bit arithmetic,
which means operating on the lower 8 bits first, then on the upper 8
bits.
Overflow
• In 8-bit arithmetic, addition of two unsigned numbers whose sum is
greater than 255 causes an overflow, a carry into the ninth column.
SIGN-MAGNITUDE NUMBERS
• The Sign magnitude numbers contain a sign bit followed by magnitude
bits. Numbers in this form are called sign-magnitude numbers.
• 0 is used for the + sign and 1 for the - sign. Therefore, -001, -010, and-
011 are coded as 1001, 1010, and 1011.
• The MSB always represents the sign, and the remaining bits always
stand for the magnitude.
• some examples of converting sign-magnitude numbers:
Range of Sign-Magnitude Numbers
• When we use sign-magnitude numbers, the largest magnitude is 127
because we need to represent both positive and negative quantities.
• As long as our input data is in the range of -127 to + 127, we can use 8-bit
arithmetic.
• With 8 bit numbers, its range is from -127 to +127.
• The main advantage of sign-magnitude numbers is their simplicity.
Negative numbers are identical to positive numbers, except for the sign
bit. Because of this, we can easily find the magnitude by deleting the sign
bit and converting the remaining bits to their decimal equivalents.
• Question: In sign-magnitude form, what is the decimal value of 1000
1101? Of 0000 1101?
1 's Complement
• The 1's complement of a binary number is the number that results
when we complement each bit.
• For example, The 1’s complement of 1010 is 0101.
Things to remember about 2' s complement
representation:
• 0 is always considered as a positive number.
• Its range is from -2n-1 to 2n-1 – 1. i.e. we can represent -8 to 7 using 4
bits.
• Positive numbers always have a sign bit of 0, and negative numbers
always have a sign bit of 1.
• Positive numbers are stored in sign-magnitude form.
• Negative numbers are stored as 2's complements.
• Taking the 2's complement is equivalent to a sign change.
2'S. COMPLEMENT ARITHMETIC
Addition
• Augend and Addend is represented in 2’s complement representation.
• Addition is done column by column starting form LSB.
• Discard the carry in last column if exists.
• If two numbers of same sign are added and the result is of opposite
sign, then such condition is said to be Overflow.
Perform the following using 2’s complement representation. Represent
each number using 8 bits.
1) (83)10 + (16)10 6)(100)10 + (50)10
2) (125)10 + (-68)10 7)(-85)10 + (-97)10
3) (37)10 + (-115)10
4) (-43)10 + (-78)10
2’s complement Subtraction
• Minuend and Subtrahend is represented in 2’s complement
representation.
• Take the 2’s complement of Subtrahend and add it to the Minuend.
• The addition follows the rules as described in previous topic.
Perform the following using 2’s complement representation. Represent
each number using 8 bits.
1) (83)10 - (16)10
2) (68)10 - (-27)10
3) (14)10 - (-108)10
4) (-43)10 - (-78)10

More Related Content

Similar to chapter 2 part 2.pdf

Alu1
Alu1Alu1
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
HamnaKhalid25
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
Lovely Professional University
 
Unit-1 (DLD) Lecture 2.pptx
Unit-1 (DLD) Lecture 2.pptxUnit-1 (DLD) Lecture 2.pptx
Unit-1 (DLD) Lecture 2.pptx
BunnyYadav7
 
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
shwan it
 

Similar to chapter 2 part 2.pdf (20)

U1 - Code Conversion.pptx
U1 - Code Conversion.pptxU1 - Code Conversion.pptx
U1 - Code Conversion.pptx
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
 
Counit2
Counit2Counit2
Counit2
 
Alu1
Alu1Alu1
Alu1
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number system
 
data representation
 data representation data representation
data representation
 
digital logic circuits, digital component
digital logic circuits, digital componentdigital logic circuits, digital component
digital logic circuits, digital component
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdfCS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
 
02 number systems
02 number systems02 number systems
02 number systems
 
09 binary number systems
09   binary number systems09   binary number systems
09 binary number systems
 
Arithmetic.ppt
Arithmetic.pptArithmetic.ppt
Arithmetic.ppt
 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
 
Meghna ppt.
Meghna ppt.Meghna ppt.
Meghna ppt.
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Quick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationQuick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representation
 
Unit-1 (DLD) Lecture 2.pptx
Unit-1 (DLD) Lecture 2.pptxUnit-1 (DLD) Lecture 2.pptx
Unit-1 (DLD) Lecture 2.pptx
 
DATA REPRESENTATION.pptx
DATA REPRESENTATION.pptxDATA REPRESENTATION.pptx
DATA REPRESENTATION.pptx
 
Data Representation
Data RepresentationData Representation
Data Representation
 
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
 

More from Praches1 (7)

chapter 2 part 1.pdf
chapter 2 part 1.pdfchapter 2 part 1.pdf
chapter 2 part 1.pdf
 
09_op-amps.ppt
09_op-amps.ppt09_op-amps.ppt
09_op-amps.ppt
 
08-Multiplexing.ppt
08-Multiplexing.ppt08-Multiplexing.ppt
08-Multiplexing.ppt
 
04-TransmissionMedia.ppt
04-TransmissionMedia.ppt04-TransmissionMedia.ppt
04-TransmissionMedia.ppt
 
03-DataTransmission.ppt
03-DataTransmission.ppt03-DataTransmission.ppt
03-DataTransmission.ppt
 
microprocessor_8085_architecture.ppt
microprocessor_8085_architecture.pptmicroprocessor_8085_architecture.ppt
microprocessor_8085_architecture.ppt
 
Chap4.ppt
Chap4.pptChap4.ppt
Chap4.ppt
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Recently uploaded (20)

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 

chapter 2 part 2.pdf

  • 1. CHAPTER - 2 BINARY ARITHMETIC
  • 2. BINARY ADDITION • Four most basic cases of binary addition • Column-by-column addition applies to binary as well as decimal numbers. • Start by adding the least-significant column. • Example 1:
  • 3. Example 2: Add these 8-bit numbers: 0101 0111 and 0011 0101. Then, show the same numbers in hexadecimal notation. • Expressed in hexadecimal numbers, the foregoing addition is,
  • 4.
  • 5. BINARY SUBTRACTION • Four most basic cases of binary Subtraction • Subtract column by column, the same as you do with decimal numbers. • Start by subtracting the least-significant column. • To subtract the bits of the second column, you may borrow from the next-higher column. • Example 1 :
  • 6. Show the binary subtraction of (125)10 from (200)10.
  • 7. UNSIGNED BINARY NUMBERS • In unsigned binary numbers all of the bits are used to represent the magnitude of the corresponding decimal number. we can add and subtract unsigned binary numbers, provided certain conditions are satisfied. Limits • With 8-bit unsigned arithmetic, all magnitudes must be between 0 and 255. Therefore, each number being added or subtracted must be between 0 and 255. Also, the answer must fall in the range of 0 to 255. If any magnitudes are greater than 255, we should use 16-bit arithmetic, which means operating on the lower 8 bits first, then on the upper 8 bits. Overflow • In 8-bit arithmetic, addition of two unsigned numbers whose sum is greater than 255 causes an overflow, a carry into the ninth column.
  • 8.
  • 9.
  • 10. SIGN-MAGNITUDE NUMBERS • The Sign magnitude numbers contain a sign bit followed by magnitude bits. Numbers in this form are called sign-magnitude numbers. • 0 is used for the + sign and 1 for the - sign. Therefore, -001, -010, and- 011 are coded as 1001, 1010, and 1011. • The MSB always represents the sign, and the remaining bits always stand for the magnitude. • some examples of converting sign-magnitude numbers:
  • 11. Range of Sign-Magnitude Numbers • When we use sign-magnitude numbers, the largest magnitude is 127 because we need to represent both positive and negative quantities. • As long as our input data is in the range of -127 to + 127, we can use 8-bit arithmetic. • With 8 bit numbers, its range is from -127 to +127. • The main advantage of sign-magnitude numbers is their simplicity. Negative numbers are identical to positive numbers, except for the sign bit. Because of this, we can easily find the magnitude by deleting the sign bit and converting the remaining bits to their decimal equivalents. • Question: In sign-magnitude form, what is the decimal value of 1000 1101? Of 0000 1101?
  • 12. 1 's Complement • The 1's complement of a binary number is the number that results when we complement each bit. • For example, The 1’s complement of 1010 is 0101.
  • 13.
  • 14. Things to remember about 2' s complement representation: • 0 is always considered as a positive number. • Its range is from -2n-1 to 2n-1 – 1. i.e. we can represent -8 to 7 using 4 bits. • Positive numbers always have a sign bit of 0, and negative numbers always have a sign bit of 1. • Positive numbers are stored in sign-magnitude form. • Negative numbers are stored as 2's complements. • Taking the 2's complement is equivalent to a sign change.
  • 15. 2'S. COMPLEMENT ARITHMETIC Addition • Augend and Addend is represented in 2’s complement representation. • Addition is done column by column starting form LSB. • Discard the carry in last column if exists. • If two numbers of same sign are added and the result is of opposite sign, then such condition is said to be Overflow. Perform the following using 2’s complement representation. Represent each number using 8 bits. 1) (83)10 + (16)10 6)(100)10 + (50)10 2) (125)10 + (-68)10 7)(-85)10 + (-97)10 3) (37)10 + (-115)10 4) (-43)10 + (-78)10
  • 16. 2’s complement Subtraction • Minuend and Subtrahend is represented in 2’s complement representation. • Take the 2’s complement of Subtrahend and add it to the Minuend. • The addition follows the rules as described in previous topic. Perform the following using 2’s complement representation. Represent each number using 8 bits. 1) (83)10 - (16)10 2) (68)10 - (-27)10 3) (14)10 - (-108)10 4) (-43)10 - (-78)10