1 / 15

Complements

Complements. In digital computer to simplify the subtraction operation and for logic manipulation Complements are used. There are two types of Complements:. 1. The Radix Complement ( r’ Complement). 2 . Diminished radix complement ( (r-1)’ Complement ). Decimal Number System.

annalise
Download Presentation

Complements

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Complements In digital computer to simplify the subtraction operation and for logic manipulation Complements are used. There are two types of Complements: 1. The Radix Complement (r’ Complement) 2. Diminished radix complement ( (r-1)’ Complement)

  2. Decimal Number System 9’s and 10’s Complements 9’ Complement: The 9’s complement of the decimal number is obtained by subtracting each digit of that decimal number from 9.

  3. 9’s Complement of subtraction • Find the 9’s complement of the subtracted number & add it to the main no. • If carry is present in the intermediate results, it indicates that the answer is +ve, Add the carry to LSB. • If carry doesn't present, then the answer is –ve. place –vesign before the answer and find its 9’complement.

  4. 10’ Complement: The 10’s complement of the decimal number is obtained by adding a1 to its9’s complement.

  5. 10’s Complement of subtraction • Find the 10’s complement of the subtracted number & add it to the main no. • If carry is present in the intermediate results, it indicates that the answer is +ve, and neglect the carry. • If carry doesn't present, then the answer is –ve . place –vesign before the answer and find its 10’complement.

  6. Binary complements. • 1’s Complement • 2’s Complement

  7. 1’s Complement • The 1’ complement of a binary number is the number that results when we change all 1’s to zeros and zeros to 1’s. • 2’s Complement • The 2’ complement of a binary number is the number that results when we add 1 to LSB of its 1’s complement no.

  8. Binary Arithmetic • Binary addition • The four possible elementary operations are • 0+0=0 • 0+1=1 • 1+0=1 • 1+1=0 with carry 1.

  9. Binary Arithmetic • Binary Substraction • The four possible elementary operations are • 0-0=0 • 0-1=1 with borrow 1. • 1-0=1 • 1-1=0

  10. Binary Arithmetic • Binary Multiplication • The four possible elementary operations are • 0*0=0 • 0*1=0 • 1*0=0 • 1*1=1

  11. Binary Arithmetic • Binary Division • The two possible elementary operations are • 0/1=0 • 1/1=1 • Note: In Binary numbers divide by ‘0’ has no meaning.

  12. BinarySubtraction using 1’s Complement Method • In this method Operation A-B is performed using following Steps. • Take 1’s complement of B. • Result=A+1’s complement of B. • If carry is generated then the result is +veand add carry to the result to get the final answer. • If carry is not generated then the result is -veand for final result find the 1’s complement of the intermediate results.

  13. BinarySubtraction using 2’s Complement Method • In this method Operation A-B is performed using following Steps. • Take 2’s complement of B. • Result=A+2’s complement of B. • If carry is generated then the result is +veand add Ignor the carry. • If carry is not generated then the result is -veand for final result find the 2’s complement of the intermediate results.

  14. Representation of sign numbers using 1’s and 2’s complement method. • If the number is +ve the magnitude is represent in its true binary form and a sign bit ‘0’ placed in front of MSB. • If the number is -ve the magnitude is represent in its 1’s or 2’s complement form and a sign bit ‘1’ placed in front of MSB.

  15. 2.perform the following i) Subtract by using 10’s compliment for the given 3456-245 ii) Subtract by using 2’s compliment for the given 111001-1010

More Related