0% found this document useful (0 votes)
30 views37 pages

Chapter 3 Digital Arithmetics

This document discusses binary arithmetic operations including addition, subtraction, multiplication, and division. It provides the basic rules and procedures for performing each operation in binary. Examples are provided to demonstrate how to apply the rules and procedures to solve binary arithmetic problems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views37 pages

Chapter 3 Digital Arithmetics

This document discusses binary arithmetic operations including addition, subtraction, multiplication, and division. It provides the basic rules and procedures for performing each operation in binary. Examples are provided to demonstrate how to apply the rules and procedures to solve binary arithmetic problems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

1

Chapter Three : 3
Binary Addition & Subtraction
2

Binary Arithmetic
Rules of Binary Addition
Procedure of Binary Addition
Examples of Binary Addition
Rules of Binary Subtraction
Procedure of Binary Subtraction
Examples of Binary Subtraction
Binary Arithmetic
3

 Binary arithmetic is essential in all digital computers


and in many other types of digital systems.
 To understand digital systems, you must know the
basics of binary addition, subtraction, multiplication,
and division.
 This section provides an introduction that will be
expanded in later sections.
Rules of Binary Addition
4

 The four Basic Rules for adding binary digits (bits) are
as follows:
➢0 +0=0 Sum of 0 with a carry of 0
➢0 +1=1 Sum of 1 with a carry of 0
➢1 +0=1 Sum of 1 with a carry of 0
➢1 + 1 = 10 Sum of 0 with a carry of 1
In binary 1 + 1 = 10, not 2
Rules of Binary Addition
5

 Notice that the first three rules result in a single bit


and in the fourth rule the addition of two 1s yields
a binary two (10).
 When binary numbers are added, the last condition
creates a sum of 0 in a given column and a carry of
1 over to the next column to the left, as illustrated
in the following addition of 11 + 1.
Rules of Binary Addition
6

 In the right column, 1 + 1 = 0 with a carry of 1


to the next column to the left.
 In the middle column, 1 + 1 + 0 = 0 with a carry
of 1 to the next column to the left.
 In the left column, 1 + 0 + 0 = 1.
Procedure of Binary Addition
7

 Starting with the LSB, add each pair of digits,


include the carry if present.
EXAMPLE
8

❑Perform the following addition:


60 + 42 = ?

Decimal Binary
60 00111100
42 00101010
102 01100110
EXAMPLE
9

• Add the following binary numbers:


a) 11 + 11 b) 100 + 10
c) 111 + 11 d) 110 + 100

• Related Problem
Add 1111 and 1100
EXAMPLE
10

• Perform the following additions:


a) (275.75)10 + (37.875)10
b) (AF1.B3)16 + (FFF.E)16

Solution:
• First, the two given decimal numbers will be converted
into their equivalent binary numbers (as further
discussed in Chapter 1).
❖ (275.75)10 = (100010011.11)2 & (37.875)10 =
(100101.111)2
Cont.…
11

 The two binary numbers can be rewritten as (100010011.110)2 and


(000100101.111)2 to have the same number of bits in their integer and
fractional parts.

 The Addition of two numbers is performed as follows:


100010011.110

000100101.111

_____________

100111001.101

 The decimal equivalent of (100111001.101) 2 is (313.625) 10


12
Binary Subtraction
13

 The four basic rules for subtracting binary digits (bits)


are as follows:
0 -0=0
1 -1=0
1 -0=1
10 -1=1 0 -1 with a borrow of 1
 In binary 10 - 1 = 1, not 9
Procedure of Binary Subtraction
14

❑ When subtracting numbers, you sometimes have to borrow from


the next column to the left.
❑ A borrow is required in binary only when you try to subtract a 1
from a 0. In this case, when a 1 is borrowed from the next column
to the left, a 10 is created in the column being subtracted, and
the last of the four basic rules just listed must be applied.

❑ The following examples illustrate binary subtraction; the


equivalent decimal subtractions are also shown.
Example
15
Example
16
Example
17

 Subtract (1110.011)2 from (11011.11)2


 Using basic rules of binary subtraction and verify the
result by showing equivalent decimal subtraction.
Solution
 The minuend and subtrahend are first modified to
have the same number of bits in the integer and
fractional parts.
Cont.…
18

 The modified minuend and subtrahend are (11011.110)2 and (01110.011)2


Respectively:
11011.110
01110.011
--------------
01101.011

 The decimal equivalents of (11011.110)2 and (01110.011)2 are 27.75 &


14.375 respectively.

✓ The difference is 13.375, which is the decimal equivalent of (01101.011)2


Binary Subtraction Using 1's Complement
19

 Binary subtraction by 1’s complement procedure


 Write the subtrahend's 1's complement.
 Then, using the minuend, add the 1's complement of the
subtrahend to the minuend.
 If there is a carryover in the result, add it in the least significant
bit.
 If there is no carryover, take the resultant's 1's complement,
which is negative.
Example
20

 (110101)2 – (100101)2 = ?
 Solution:

 1’s complement of -100101 is 011010

 So, add 110101 + 011010

 Add carry to the result.

 Therefore the result is (010000)2 which is = 1610


Binary Subtraction Using 2's Complement
21

 To subtract one value from another using 2’s complement,


convert the minuend to two's complement format and add the
numbers.

 Example: Subtract 42 from 53


 Solution: 53 = 42 = ?
 (53)10 = (00110101) 2

 (42)10 = (00101010) 2
The carry has been discarded
 1’s complement of -42 = 11010101

 2’s complement -42 = 11010110


 So, add 00110101 + 11010110
22
Binary Multiplication & Division
23

Binary Multiplication
Rules of Binary Multiplication
Procedure of Binary Multiplication
Examples of Binary Multiplication
Binary Division
Rules of Binary Division
Examples of Binary Division
Binary Multiplication
24

 The binary multiplication is very much similar to


the usual multiplication method of integers.
 First, we need to multiply each digit of one binary
number to each digit of another binary number.
 And then add them all together to get the final
result.
Rules of Binary Multiplication
25

 The four major steps in binary digit multiplication are:


0 *0=0
 0*1=0
 1*0=0
 1*1=1
No borrow or carry method is applicable here.
Procedure of Binary Multiplication
26

 Multiplication involves forming partial products,

shifting each successive partial product left one


place, and then adding all the partial products.
Examples of Binary Multiplication
27

Solve 1010 × 101


Solution:
1010 = 10
* 101 = 05
—————–
1010
+ 0000
1010
——————–
110010 = 50
Examples of Binary Multiplication
28
Examples of Binary Multiplication
29

 Example: Perform the following multiplication:


(23) 10 × (6) 10
Binary Division
30

 The Binary Division operation is similar to the base 10


decimal system, except the base 2.

 The division is probably one of the most challenging


operations of the basic arithmetic operations.
 There are different ways to solve division problems
using binary operations.
 Long division is one of them and it is the easiest and the
most efficient way.
Rules of Binary Division
31

 The main rules of the binary division include:


 1÷1 = 1
 1÷0 = Meaningless

 0÷1 = 0

 0÷0 = Meaningless

 Binary division is similar to decimal division, which follows the


four-step process: Divide
Multiply
Subtract
Bring down
Comparison with Decimal Value
32

 Dividend (01111100)2 = (1111100)2 = 12410

 Divisor (0010)2 = (10)2 = 210

 Remove the zero’s in the MSB in both the dividend and divisor.
 You will get the result value as 62 when you divide 124 by 2. So
the binary equivalent of 62 is (111110)2 = 6210
 Both the binary and the decimal system produce the same
Result.
Example: Solve (01111100)2 ÷ (0010)2
33

 Solution:

 Remove the zero’s in the Most


Significant Bit in both the
dividend and divisor, that doesn’t
change the value of the number.
 So the dividend becomes 1111100,
and the divisor becomes 10.

 Now, use the long division method.


Example:
34
Class Activity Work
35

 Solve using the long division Method: (101101) 2 ÷ (101) 2


Solution:
❑ So, when you bring down the
fourth bit of the dividend, it
does not match with the
divisor.
❑ In order to bring down the
5th and 6th bit of the dividend,
add two zeros in the quotient
value.
Assignment
36

1. Add 1011 and 110 7. Multiply 10111 by 1101

2. Add 1100 and 101 8. Multiply 11011.101 by 101.111

3. Subtract 101 from 1010 9. Divide 1111100 with 10

4. Subtract 0001010 from 0100010 10. Divide 011010000 With 0101

5. Perform subtraction using 1’s complement: 1100 – 1011

6. Perform subtraction using 2’s complement: 1001 - 1011


37

You might also like