Binary Arithmetic




Binary Arithmetic



Binary ArithmeticThe addition, subtraction, multiplication and
division of binary numbers is performed in exactly the same way as the addition,
subtraction, multiplication and division of decimal numbers. The only difference
is that the decimal system has ten digits whereas the binary system has two.

Binary
Addition
Binary
Subtraction
Binary
Multiplication
Binary
Division Back to IN2254 Page



Binary AdditionThere are 4 rules to follow for Binary
Addition: 1
1 1
0 0 1 1
+ 0 + 1 + 1 + 1
0 1 10 11
Here are some examples: 1. Carry : 1 1 check:
Addend: 1 1 0 1 0 (2610)
Addend: + 1 1 1 0 0 + (2810)
Sum: 1 1 0 1 1 0 (5410)




2. Carry : 1 1 1 1 check:
Addend: 1 0 1 1 (1110)
Addend: + 1 1 0 1 + (1310)
Sum: 1 1 0 0 0 (2410)

Back to top of
page
Subtraction .
. . Multiplication
. . . Division



Binary SubtractionThere are 4 rules to follow for Binary
Subtraction:
Borrow
0 1 1 10
- 0 - 0 - 1 - 1
0 1 0 1
Here is an example: 0 1
1. Borrow : 10 check:
Minuend: 1 0 1 10 1 1 0 (8610)
Subtrahend: - 1 1 1 0 0 - (2810)
Difference: 1 1 1 0 1 0 (5810)


Back to top of
page
Addition . .
. Multiplication
. . . Division



Binary MultiplicationThere are 4 rules to follow for Binary
Multiplication:

0 0 1 1
x 0 x 1 x 0 x 1
0 0 0 1
Here is an example:
1. check:
Multiplicand: 1 0 1 1 (1110)
Multiplier: x 1 0 1 x ( 510)
1 0 1 1 (5510)
10 0 0 0
1 0 1 1
Product: 1 1 0 1 1 1


Back to top of
page
Addition . .
. Subtraction .
. . Division



Binary DivisionBinary division is performed in the same fashion as
decimal division but is actually easier because the when you divide, the digits
in the quotient can only be 0 or 1. Here is an example:
1. check:
Quotient: 0 0 0 1 1 1 1 1 5
Divisor: 1 0 1 ) 1 0 0 1 1 0 1 . 0 5 ) 7 7
- 1 0 1 - 5
1 0 0 1 2 7
- 1 0 1 - 2 5
1 0 0 0 2
- 1 0 1
0 1 1 1
- 1 0 1
0 1 0




Back to top of
page
Addition . .
. Subtraction .
. . Multiplication



Wyszukiwarka

Podobne podstrony:
binary function
Static Analysis of Binary Code to Isolate Malicious Behaviors
counter binary+it summary
ArithmeticModulo README
math Complex Numbers and Complex Arithmetic
binary clock
2008 T DNA Binary Vectors and Systems
binarypredicate
binarysearch
Binary multiplication
language operators arithmetic
binary
function imap binary
ArithmeticException
05 Optional Fractional Binary Numbers
binaryfunction
ArithmeticException
Arithmetic

więcej podobnych podstron