Binary Arithmetic Binary operations Binary

Published  . 0 views
↓ Download
Binary Arithmetic Binary operations Binary
1 / 1
Binary Arithmetic Binary operations Binary - slide 1 of 51 Binary Arithmetic Binary operations Binary - slide 2 of 51 Binary Arithmetic Binary operations Binary - slide 3 of 51 Binary Arithmetic Binary operations Binary - slide 4 of 51 Binary Arithmetic Binary operations Binary - slide 5 of 51 Binary Arithmetic Binary operations Binary - slide 6 of 51 Binary Arithmetic Binary operations Binary - slide 7 of 51 Binary Arithmetic Binary operations Binary - slide 8 of 51 Binary Arithmetic Binary operations Binary - slide 9 of 51 Binary Arithmetic Binary operations Binary - slide 10 of 51 Binary Arithmetic Binary operations Binary - slide 11 of 51 Binary Arithmetic Binary operations Binary - slide 12 of 51 Binary Arithmetic Binary operations Binary - slide 13 of 51 Binary Arithmetic Binary operations Binary - slide 14 of 51 Binary Arithmetic Binary operations Binary - slide 15 of 51 Binary Arithmetic Binary operations Binary - slide 16 of 51 Binary Arithmetic Binary operations Binary - slide 17 of 51 Binary Arithmetic Binary operations Binary - slide 18 of 51 Binary Arithmetic Binary operations Binary - slide 19 of 51 Binary Arithmetic Binary operations Binary - slide 20 of 51 Binary Arithmetic Binary operations Binary - slide 21 of 51 Binary Arithmetic Binary operations Binary - slide 22 of 51 Binary Arithmetic Binary operations Binary - slide 23 of 51 Binary Arithmetic Binary operations Binary - slide 24 of 51 Binary Arithmetic Binary operations Binary - slide 25 of 51 Binary Arithmetic Binary operations Binary - slide 26 of 51 Binary Arithmetic Binary operations Binary - slide 27 of 51 Binary Arithmetic Binary operations Binary - slide 28 of 51 Binary Arithmetic Binary operations Binary - slide 29 of 51 Binary Arithmetic Binary operations Binary - slide 30 of 51 Binary Arithmetic Binary operations Binary - slide 31 of 51 Binary Arithmetic Binary operations Binary - slide 32 of 51 Binary Arithmetic Binary operations Binary - slide 33 of 51 Binary Arithmetic Binary operations Binary - slide 34 of 51 Binary Arithmetic Binary operations Binary - slide 35 of 51 Binary Arithmetic Binary operations Binary - slide 36 of 51 Binary Arithmetic Binary operations Binary - slide 37 of 51 Binary Arithmetic Binary operations Binary - slide 38 of 51 Binary Arithmetic Binary operations Binary - slide 39 of 51 Binary Arithmetic Binary operations Binary - slide 40 of 51 Binary Arithmetic Binary operations Binary - slide 41 of 51 Binary Arithmetic Binary operations Binary - slide 42 of 51 Binary Arithmetic Binary operations Binary - slide 43 of 51 Binary Arithmetic Binary operations Binary - slide 44 of 51 Binary Arithmetic Binary operations Binary - slide 45 of 51 Binary Arithmetic Binary operations Binary - slide 46 of 51 Binary Arithmetic Binary operations Binary - slide 47 of 51 Binary Arithmetic Binary operations Binary - slide 48 of 51 Binary Arithmetic Binary operations Binary - slide 49 of 51 Binary Arithmetic Binary operations Binary - slide 50 of 51 Binary Arithmetic Binary operations Binary - slide 51 of 51
Description: Binary Arithmetic Binary operations Binary addition Binary subtraction Binary multiplication Binary division Binary addition Rules for binary addition: Binary addition Addition of large binary numbers Solve (12)10 (8)10 (15)10 (10)10

Related Topics

Download Presentation

"Binary Arithmetic Binary operations Binary" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

slide1. Binary Arithmetic<br>
slide2. Binary operations Binary addition
Binary subtraction
Binary multiplication
Binary division<br>
slide3. Binary addition Rules for binary addition:<br>
slide4. Binary addition<br>
slide5. Addition of large binary numbers<br>
slide7. Solve (12)10 + (8)10
(15)10 + (10)10
(35)10 + (48)10
(10101)2 + (10110)2
(10111)2 + (11000)2<br>
slide8. Binary Subtraction<br>
slide9. Rules for binary subtraction<br>
slide10. Binary subtraction<br>
slide11. Subtraction of large binary numbers 11001 - 10111 = 00010<br>
slide12. Examples<br>
slide13. Binary subtraction Example 1: 0011010 – 001100
Solution:
1 1 Borrow
0 0 1 1 0 1 0
(-) 0 0 1 1 0 0
——————
0 0 0 1 1 1 0
Decimal Equivalent :
0 0 1 1 0 1 0 = 26
0 0 1 1 0 0 = 12
Therefore, 26 – 12 = 14
The binary resultant 0 0 0 1 1 1 0 is equivalent to the 14<br>
slide14. Logic for binary to decimal 0 0 1 1 0 1 0 =26
26 25 24 23 22 21 20
64 32 16 8 4 2 1
16 8 2 =26<br>
slide15. Binary Subtraction Example 2: 0100010 – 0001010
Solution:
1 1 Borrow
0 1 0 0 0 1 0 = 3410
(-) 0 0 0 1 0 1 0 = 1010
——————
0 0 1 1 0 0 0 = 2410<br>
slide16. Binary subtraction subtract 1010101.10 from 1111011.11
1 borrow
1111011.11 – 1010101.10 ——————– 0100110.01 ——————–<br>
slide17. Binary subtraction using 1’s and 2’s complement method<br>
slide18. How to find 1’s Complement of given number 1’s complement of a number is found by changing all 1’s to 0’s and all 0’s to 1’s.
Ex: 1’s complement of a number 10111 is = 01000
Solve---- Find 1’s complement of
11010 = 00101
101101= 010010
1010= 0101
1111=0000
1011001=0100110<br>
slide19. How to find 2’s Complement of given number The 2’s complement of a number is obtained by adding 1 to the LSB of 1’s complement of that number
2’s complement = 1’s complement + 1
Ex: obtain 2’s complement of a number (10110010)2
Solution:<br>
slide20. Solve Find 2’s complement of following numbers.
(1101)2 0010=1=0011
(10111)2 01000+1=01001
(101101)2 010010+1=010011
(1011111)2 010000+1=010001
(101111101)2 010000010+1=010000011<br>
slide21. Subtraction using 1s complement A) For subtracting a smaller number from a larger number, the 1s complement method is as follows:
1. Determine the 1s complement of the smaller number.
2. Add the 1s complement to the larger number.
3. Remove the final carry and add it to the result. This is called the end-around carry.<br>
slide22. Binary subtraction using 1’s complement method To perform subtraction (A)2 - (B)2
Step 1: convert number to be subtracted (B)2 to its 1’s complement.
Step 2: Add first number (A)2 and 1’s complement of (B)2 using rules of binary addition.
Step 3: if final carry is 1 then add it to the result of addition obtained in step 2 to get final result.
**If final carry in step 2 is 1 then result obtained in step 2 is Positive and in its true form no conversion required.
Step 4: if final carry in step 2 is 0 then result obtained in step 2 is negative and in 1’s complement form. So convert it to its true form.<br>
slide23. Binary subtraction using 1’s complement 10---------------------------------- 10
-3 - 11-----1’complement of 11 +00
--- -----
-1 10 result
1’s complement of result 01 final result
carry 0 so result sign is negative 0<br>
slide24. 3 11 11
-2 10---------01
----------
1 0 0
1
------------
01<br>
slide25. Binary subtraction using 1’s complement 9 1001 1001
15 1111 1’s complement +0000
------- -------
-6 1001
1’s complement of result 0110 ---6
carry is 0 so result sign is negative 0<br>
slide26. Binary Subtraction Questions Using 1’s Complement Question 1:
(110101)2 – (100101)2
Solution:
(1 1 0 1 0 1)2 = 5310------- minuend.
(1 0 0 1 0 1)2 = 3710 – subtrahend
Now take the 1’s complement of the subtrahend and add with minuend.

1 carry
1 1 0 1 0 1
(+) 0 1 1 0 1 0
——————
0 0 1 1 1 1

+ 1 carry
——————
0 1 0 0 0 0

Therefore, the solution is 010000
(010000)2 = 1610 1<br>
slide27. Binary Subtraction Questions Using 1’s Complement Question 2:
(101011)2 – (111001)2 43-57= -14
Solution:
Take 1’s complement of the subtrahend
1 1 1
1 0 1 0 1 1
(+) 0 0 0 1 1 0 (1’s complement)
——————
1 1 0 0 0 1
Now take the 1’s complement of the resultant since it does not carry 1
The resultant becomes 0 0 1 1 1 0
Now, add the negative sign to the resultant value
Therefore the solution is – (001110)2.<br>
slide28. Binary subtraction using 2’s complement method To perform subtraction (A)2 - (B)2

Step 1: convert number to be subtracted (B)2 to its 2’s complement.
Step 2: Add first number (A)2 and 2’s complement of (B)2 using rules of binary addition.
Step 3: if final carry is 1 then the result Positive and in its true form no conversion required.
Step 4: if final carry in step 2 is 0 then result obtained in step 2 is negative and in 2’s complement form. So convert it to its true form.
** Carry always be discarded.<br>
slide29. Binary subtraction using 2’s complement 5 101
-7 111 1’s comple.---000
---- + 1
-2 ------
2’s complement 001
+101
-------
result 110
1’s complement 001
+ 1
--------
2’s complement 010 final result
Carry is 0 so result is negative 0<br>
slide30. 13 1101
-10 1010 0101
------- 1
03 ---------
0110
1101
--------------
1 0011<br>
slide31. Subtraction using 2’s complement 33 100001
-45 101101 1’s 010010
----- + 1
-12 ------------
2’s 010011
+100001
------------
110100 result
1’s 001011
+ 1
-------------
2’s 001100 final result 0<br>
slide32. Solve the following binary subtraction using 1’s and 2’s complement method 15-23
25-18
23-18
18-9<br>
slide34. 10111 10111
-10010 01101 1’s
1
---------
01110
10111
-----------
100101<br>
slide35. Binary Multiplication<br>
slide36. Multiplication (1 of 3) Decimal (just for fun) 35 x 105 175 000 35 3675<br>
slide37. Multiplication Binary, two 1-bit values<br>
slide38. Example Binary Multiplication A = 910 = 10012
A3A2A1A0

B = 810 = 10002
B3B2B1B0
 
1001
× 1000
------------------
0000 multiply by B0
+ 0000 multiply by B1
+ 0000 multiply by B2
+ 1001 multiply by B3
--------------
1001000


Cross check
1 0 0 1 0 0 0

64 32 16 8 4 2 1 place value of result bits

64+8=72<br>
slide39. Perform the following multiplication in binary number system: 10112 × 1012 1 0 1 1
× 1 0 1
---------
1 0 1 1
+ 0 0 0 0
+ 1 0 1 1
carry 1
-------------------
1 1 0 1 1 1<br>
slide40. Perform the following multiplication in binary number system: 101.12 × 11.12 1 0 1 .1
× 1 1 .1
----------------
1 0 1 1
+ 1 0 1 1
+ 1 0 1 1
Carry 1 1 1 1
---------------------
1 0 0 1 1. 0 1<br>
slide41. Multiplication Binary, two n-bit values
As with decimal values
E.g., 1110 x 1011 1110 1110 0000 1110 10011010<br>
slide42. Binary Multiplication Perform the following multiplication in binary number system: 1510 × 810
Perform the following multiplication in binary number system: 10012 × 11012
Perform the following multiplication in binary number system: 111.112 × 101.12<br>
slide43. Solve (205)10 x (3)10
(1110101)2 x (1001)2
(110)2 x (10)2
(1111101)2 x (101)2
(15)10 x (8)10<br>
slide44. Binary Division<br>
slide45. Binary Division:110 ÷10 10) 110 ( 11
- 10
----------
010
- 10
------------
000<br>
slide46. Binary division Ex: (25)10 ÷ (5)10<br>
slide47. Perform the division 111110.1 ÷101 1100.1 quotient
111110.1 5)62.5(12.5
-101 -5
-------------- ---------
0101 12.5
- 101 - 10
------------- --------
0000101 02.5
- 101 - 2.5
-------------- --------
0000000 remainder 000<br>
slide48. Solve (205)10 ÷ (3)10
(1110101)2 ÷ (1001)2
(110)2 ÷ (10)2
(1111101)2 ÷ (101)2<br>
slide50. 100)1100(11
100
---------------
0100
100
----------------
0000<br>
slide51. END<br>