Sunday, November 29, 2009
OCTAL SUBTRACTION
Since we can't subtract 0 by 6, we have to borrow from 2. Subtract 1 from 2 and add 8 to 0. We're adding 8 because we're dealing with OCTAL number systems. So if we were to do this in DECIMAL, we add 10; HEXADECIMAL we add 16. This is actually what happens no matter what number system you're dealing with.
So, subtract 6 from 8 to get 2.
We can't subtract 3 from 1 so we borrow 1 from 1 making the 3rd digit zero. Now we add 8 to 1 to have 9.
Subtract 3 from 9 to get 6. The final answer is 62.
OCTAL ADDITION
The octal number system consists of 8 digits ranging from 0 to 7.
5 + 6 = 11. We write 11 below and not write 1 carry 1. Do the same for the other numbers. 7 + 3 = 10. 6 + 4 = 10.
Here's what we do with the 2 digit numbers. We find multiples of 8 ( 0, 8, 16, 24, 32, 40...) closest to the sum. For the first digit , we have 11. The closest would be 8 so we subtract 8 to 11 to get 3. We subtracted it by 8 once so we add 1 to the next digit. 10 + 1 will be 11. Find the multiple closest to 11 which is 8. Perform the subtraction to get 3 and carry 1 to the next digit once again. Repeat the process until all digits are below 8.
Here's what we do with the 2 digit numbers. We find multiples of 8 ( 0, 8, 16, 24, 32, 40...) closest to the sum. For the first digit , we have 11. The closest would be 8 so we subtract 8 to 11 to get 3. We subtracted it by 8 once so we add 1 to the next digit. 10 + 1 will be 11. Find the multiple closest to 11 which is 8. Perform the subtraction to get 3 and carry 1 to the next digit once again. Repeat the process until all digits are below 8.
The final answer is 1 3 3 3 (Octal).
If we were to do this normally in decimal number system ( 0 - 9) , every time we reach a value of 10 or above, we always carry a 1 and input the remainder. So in octal number system ( 0 - 7) we carry a 1 every time we reach a value of 8 or above. This concept is applied to ANY number system that you can think of.
BINARY DIVISION
Here is an example:
Step1. 1 0 is divisible by 1 0. Enter a quotient of 1. Multiply 1 by 1 0 . Subtract 1 0 by 1 0.
Step2. 1 0 - 1 0 is 0. We bring down 1. Since 0 1 is not divisible by 1 0. We enter a 0 into the quotient.
Then step3. We bring down the last digit 1. Now we'd have to divide 0 1 1 by 1 0, so we enter 1 to have 0 1 1 - 1 0.
Perform the subtraction operation of 0 1 1 and 1 0 to get 1. This will be our remainder.
The final answer is 1 0 1 remainder 1.
BINARY MULTIPLICATION
Step1. We multiplied 1 0 1 by 0. This will yield 0 0 0.
Step2. We leave a space on the first digit. We multiply 1 0 1 by 1 to get 1 0 1 _.
Step3. Multiply 1 0 1 by 1 to get 1 0 1.
Just like in any other multiplication process, we add all the products of each digit.
> Bring down 0.
> 0 + 1 = 1
> 0 + 0 + 1 = 1
> 1 + 0 = 1
> Bring down 1
We get a final answer of 1 1 1 0.
BINARY SUBTRACTION
This is the basics of binary subtraction.
We can't subtract 1 from 0 so we'd have to borrow from the 2nd digit.
Every time we borrow, we're actually getting 1 and 1. So we'd have:
1 0 <--- this can be written as--> 1
- 1 + 1
--------- - 1
1 --------
1
Then continue subtracting the next digits, 0 - 0 will be 0. 1 - 0 will be 1.
Final Answer is 1 0 1.
Saturday, November 28, 2009
BINARY ADDITION
The binary number systems consists of only 2 digits : these are 0 and 1.
In this number system, we apply the same rules as adding numbers in the decimal system.
In this number system, we apply the same rules as adding numbers in the decimal system.
This is the basics of binary addition.
You're probably wondering why 1 + 1 is 1 0 and not 2. That's because there is no number 2 (or 3, 4, 5, 6...) in the system. Every time a 1 + 1 appears, we carry 1 to the following digit and leave a 0 in the first digit.
Now let's try it with a four digit binary number :
So, we add these numbers as we normally would, column by column.
Zero plus zero will be 0.
One plus one will be 1 0. So we write the 0 while the 1 is carried over to the third column.
One plus zero plus one is equal to 1 0. Bring down 0 and carry the 1 over to the 4th column.
1 plus 1 will be 1 0. Add another 1 and the result will be 1 1.
Bring down 1 while the other 1 is carried over.
Bring down the last 1 to get the answer.
So, we add these numbers as we normally would, column by column.
Zero plus zero will be 0.
One plus one will be 1 0. So we write the 0 while the 1 is carried over to the third column.
One plus zero plus one is equal to 1 0. Bring down 0 and carry the 1 over to the 4th column.
1 plus 1 will be 1 0. Add another 1 and the result will be 1 1.
Bring down 1 while the other 1 is carried over.
Bring down the last 1 to get the answer.
Subscribe to:
Posts (Atom)