You are on page 1of 24

ARITHMETI

C
OPERATION But first,

What is ARITHMETIC?
S
The mathematics of integers, rational
numbers, real numbers, or complex
numbers under addition, subtraction,
multiplication, and division.
4 Arithmetic Operations
1. Binary Addition
2. Binary Subtraction
3. Binary Multiplication
4. Binary Division

There are only 2 numbers involved,

1 (one) and 0 (zero)


BINARY ADDITION
The rules are:
0 + 0 is equal to 0
0 + 1 is equal to 1
1 + 0 is equal to 1
1 + 1 is equal to 1 0
STEPS:
Step 1: In the first step, we have to write the two binary numbers.
Write one number in the top to the another number. The alignment
should be properly made.

Step 2: In the second step, we have to start from the right side. Then
we can add the two numbers.

Step 3: If any carry comes means, then it must be added to the next
digit numbers.

Step 4: Then by using the following rules, we can do the binary


addition.
Example:

1 1 1

1 1 0 1
+ 1 1 1 1
1 1 1 0 0
Example:

1 1 1 1 1 1

1 1 0 1 1 1 1
+ 1 0 0 0 1
1 0 0 0 0 0 0 0
Example:
1 1
1 1 1
1
11 11 1 1
+1 1 0 11 0
1 1 1
1 0 0 0 0 0
BINARY SUBTRACTION
Binary subtraction is to be performed by
using binary addition. The subtraction of
binary numbers is done in the 2-
complement notation and then adding the
numbers in order to reduce complexity.
STEPS:
Step1: we change the second binary number, 0 is replace by 1
and 1 is replace by 0.

Step2: Now we add 1 with new binary number (Means after


replacement)

Step3: Now we add this number to first binary number.

Step4: Now after addition if it carry results in the M.S.B.


position, it is ignored.
1 1 1 1 minuend

-0 1 1 1 subtrahend

1 0 0 0 1’s complement

+ 1
1 0 0 1 2’s complement

11 0 0 0
= (1)1 0 0 0
-
1 0 0 1 minuend
1 1 1 0 subtrahend

0 0 0 1 1’s complement

+ 1

+
0 0 1 0 2’s complement

(0) 1 0 1 1
0 1 0 0
+ 1
0 1 0 1

= -1 0 1
BINARY SUBTRACTION

The rules are:


0–0=0
1–0=1
1–1=0
0 – 1 = 1 (with a borrow of 1)
Example:

0 10

1 1 0 1
- 1 0 1 1

0 0 1 0
0 10
1 10

1 0 0 1 1 1
- 0 0 1 0 1 1
0 1 1 1 0 0
0 10 0 10

1 0 1 0 1 1 1 0
- 0 0 0 1 1 1 0 1
1 0 0 1 0 0 0 1
0 1
10 10
1 0 0 1
- 1 1 1 0
0 1 1

1 0 0
+ 1
- 1 0 1
0 10

1 0 1 1
- 1 1 1 1
1 0 0

0 1 1
+ 1
- 1 0 0
BINARY MULTIPLICATION
is actually much simpler than decimal multiplication. In the case
of decimal multiplication, we need to remember 3 x 9 = 27, 7 x 8
= 56, and so on. In binary multiplication, we only need to
remember the following,
0x0=0
0x1=0
1x0=0
1x1=1
Example:

1 0 1 1
1 1 0 1
1 1 0 1 1
1 0 0 0 0
1 1 0 1 1
1 0 1 1
1 0 0 0 1 1 1 1
1001 111111
x 10 x 101
0000 111111
1001 000000
10010 111111
100111011
BINARY DIVISION
The division process of binary numbers is carried out in
simple division while the binary numbers are subtracted
in their 2 - complemented notation.
Example:
10 0 1 1 Answer:
1 1√1 1 1 0 1 1 10011 r.10
11
1
0
10
0
10 1
11
10 1
1 1
1 0
Example: Answer:
1 1 11
100√1 1 0 0
100
10 0
100
0
Example: Answer:
1 1 11
101√1 1 1 1
101
10 1
101
0

You might also like