Number System Operation
Number System Operation
OPERATION
OPERATION
• The mathematical “operation” refers to calculating a value using operands
and a math operator. The symbol of the math operator has predefined rules to
be applied to the given operands or numbers.
• A mathematical expression is a set of numbers and operations. The elements
of a math expression performing a math operation are Operands and
Operators.
• Operands – The numbers used for an operation are called operands. Based on
the type of operation, different terms are assigned to the operands.
x y x+y
0 0 0
0 1 1
1 0 1
0–0 0
1–0 1
1–1 0
RULES OF BINARY SUBTRACTION
• Rules and tricks: Binary subtraction is much easier than the decimal
subtraction when you remember the following rules:
•0–0=0
• 0 – 1 = 1 ( with a borrow of 1)
•1–0=1
•1–1=0
HOW TO DO BINARY
SUBTRACTION?
• Step 1: First consider the 1’s column, and subtract the one’s column, ( 0 – 1 ) and
it gives the result 1 as per the condition of binary subtraction with a borrow of 1
from the 10’s place.
• Step 2: After borrowing 1 from the 10’s column, the value 1 in the 10’s column is
changed into the value 0
Step 3: So, subtract the value in the 10’s place, ( 0 – 0 ) = 0.
Step 4: Now subtract the values in 100’s place. Borrow 1 from the 1000’s place ( 0 –
1 ) = 1.
HEXADECIMAL
• Number base 16
• Combinations of 0-9 and A-F
• Each position in the hexadecimal number represents 0 power of the base 16.
The last position in the number represents an x power of base 16.
RULES OF HEXADECIMAL
ADDITION
• Write two hexadecimal numbers one after another in two different lines
• Begin adding from the rightmost digits.
• If the digit is in the form of an alphabet, then convert it to the respective
decimal number to make the process easy
• Add those digits and convert the sum to the hexadecimal
• If you got the carry, then represent it on the top of the first number next digit
and result on the bottom of the second number added digit.
• Continue the process until you left nothing on the left side.
RULES OF HEXADECIMAL
SUBTRACTION
• Write two hexadecimal numbers on different lines
• Subtraction starts from the rightmost digits of the
numbers.
• Convert the alphabet into decimals and subtract two digits
and again convert the difference value as hexadecimal.
• In case the first number digit is smaller than the second
number digit, then borrow from the left side digit.
RULES OF HEXADECIMAL
SUBTRACTION
• The borrowed value is always 16 as its base is 16. Then
add borrowed value and first number digit and subtract.
• Don’t forget to mention the borrowed value on the top of
the first number digit.
• After borrowing, the left side digit decreased by 1.
• Repeat the process till you have nothing remaining on the
left side.
OCTAL
• Number base 8
• Combinations of 0-7
• Each position in the octal number represents 0 power of the base 8. The last
position in the number represents an x power of base 8.
+ 0 1 2 3 4 5 6 7
0 0 1 2 3 4 5 6 7
1 1 2 3 4 5 6 7 10
2 2 3 4 5 6 7 10 11
3 3 4 5 6 7 10 11 12
4 4 5 6 7 10 11 12 13
5 5 6 7 10 11 12 13 14
6 6 7 10 11 12 13 14 15
7 7 10 11 12 13 14 15 16
RULES IN OCTAL ADDITION AND
SUBTRACTION
• Hexadecimal principles are the same as octal.
Example:
1.
712
- 254