EASA mathematics phase Arithmetic Operations.ppt

KanishkaDeSilva10 14 views 8 slides Jul 23, 2024
Slide 1
Slide 1 of 8
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8

About This Presentation

EASA mathematics phase Arithmetic Operations.ppt


Slide Content

1
Class Objectives
•Arithmetic operations
•Decimal & Alphanumeric codes

Arithmetic Operations:
Base r Numbers
•Arithmetic operations with numbers in Base rfollow same
rules as for decimal numbers
–use only rallowable digits…
•Arithmetic operations include:
–Addition
–Subtraction
–Multiplication
2

Binary Addition: Single Bit
with CarryGiven two binary digits (X,Y) and a carry in (Z), we get the
following sum (S) and carry (C):
Carry in (Z) of 0:



Carry in (Z) of 1:
Z 1 1 1 1
X 0 0 1 1
+ Y + 0 + 1 + 0 + 1
C S 0 1 1 0 1 0 1 1
Z 0 0 0 0
X 0 0 1 1
+ Y + 0 + 1 + 0 + 1
C S 0 0 0 1 0 1 1 0

3

•Extending this to multiple bit examples:
Augend:01100 10110
Addend: +10001 +10111
Sum :11101 101101
•Note:
–the default Carry-In to the least significant bit is 0
•verify results using decimal values…
Binary Addition: Multiple Bits
4

•Multiple bit subtraction example:
Minuend : 10110 10110
Subtrahend: -10010 -10011
Difference: 00100 00011
•Note:
–If Subtrahend > Minuend
•interchange and append a –ve sign to the result
Binary Subtraction: Multiple Bits
5

Binary Multiplication
•The binary multiplication table includes:
0 *0 = 0 1 *0 = 0 0 *1 = 0 1 *1 = 1
•Extending multiplication to multiple digits:
Multiplicand: 1 0 1 1
Multiplier :x 1 0 1
Partial Products: 1 0 1 1
0 0 0 0 -
1 0 1 1 --
Product :
1 1 0 1 1 1
6

Hexadecimal Arithmetic
7
5 9 F
E 4 6
----------
1 3 E 5
5
1 4
--------
11 9
9
4
------
1 4= 16 + 3
1
carry
= E
1 5
6
------
21= 16 + 5
carry
1
Hex Equivalent Decimal Calculation
•If doing by hand, easiest to convert each set of digits to
decimal and back
•Example: Hex addition of (59F)
16& (E46)
16
DecHex
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 A
11 B
12 C
13 D
14 E
15 F

7 6 2
4 5
----------
4 6 7 2
3 7 1 0 -
-----------
4 3 7 7 2
Octal Decimal
Octal Multiplication
•Do all arithmetic operations in decimal and convert
intermediate results one at a time
•Example: Octal multiplication of (762)
8& (45)
8
8
5 x 2
5 x 6 + 1
5 x 7 + 3
4 x 2
4 x 6 + 1
4 x 7 + 3
= 10 = 8+ 2
= 31 = 24+ 7
= 38 = 32+ 6
= 8 = 8+ 0
= 25 = 24+ 1
= 31 = 24+ 7
= 12
= 37
= 46
= 10
= 31
= 37
Octal Octal
Tags