start
read a
read b
c=a-b
print c
end
Chat with our AI personalities
There are a few rules to perform arithmetic operations in binary numbers. According to those rules you can add or subtract binary numbers. There are only two arithmetic operations used in binary numbers, they are addition and subtraction.
when we add and substract any number * * * * * "substract" is not a word, and in any case, subtraction is not commutative. A binary operation ~, acting on a set, S, is commutative if for any two elements x, and y belonging to S, x ~ y = y ~ x Common binary commutative operations are addition and multiplication (of numbers) but not subtraction nor division.
The commutative property of a binary operator states that the order of the operands does not affect the result. Thus x ^ y = y ^ x where ^ is the binary operator. Addition and multiplication of numbers are two common operators that are commutative. Subtraction and division are two common ones that are not commutative.
The only two binary numbers are 0 and 1.
To be closed under an operation, when that operation is applied to two member of a set then the result must also be a member of the set. Thus the sets ℂ (Complex numbers), ℝ (Real Numbers), ℚ (Rational Numbers) and ℤ (integers) are closed under subtraction. ℤ+ (the positive integers), ℤ- (the negative integers) and ℕ (the natural numbers) are not closed under subtraction as subtraction can lead to a result which is not a member of the set.