ICT-Lecture-04 Number System Arithmetic
ICT-Lecture-04 Number System Arithmetic
2
Number system Addition and
Subtraction
Binary arithmetic
Simplicity in Hardware Design
Efficiency in Processing
Error Detection and Correction
Compact Representation
Compatibility with Boolean Logic
Scalability
3
Number system Addition and
Subtraction
4
Addition
In binary arithmetic, the process of adding two binary numbers is
called binary addition. Where, the binary numbers consist of only
0 and 1. In the binary addition, a carry is generated when the sum
is greater than 1.
0101 + 1000
1101
1010 + 0011
1101
1010 + 1110
1 1000
Binary subtraction
In binary arithmetic, binary subtraction is a mathematical
operation used to find the difference between two binary
numbers.
In binary subtraction, each bit of the binary numbers is
subtracted, starting from the rightmost bit.
Also, a borrow bit can be taken from higher bits if require.
1011011 – 10010
1001001
0011010 - 001100
0001110
10010110 - 1111010
10011100
1101101 - 11011
1010010
Binary Subtraction
1101 – 0111
0110
1010010 – 111111
0010011
100001 – 1111
010010
Represent -15 in binary
102 - 110
10110100 (180) - 10010101(149)
00011111
11101011(235) – 01100110(102) (both methods)
10000101
Binary multiplications
Multiply the rightmost bit of the second number,
1 by each bit of the first number (1101).
456 – 173
= 263
743 – 564
=157
624 - 265
337
2046 - 653
1173
Hexadecimal Addition
Hex addition
8AB + 93C
1 1E7
8AB + B78
1423
899 + 189
A22
DAF+BAF
195E
Hexadecimal
Subtraction
9654 - 5321
4333
5DC – 3AF
22D
974B – 587C
3ECF