A Question About Base 3 Subtruction

  • Thread starter transgalactic
  • Start date
  • Tags
    Base
In summary: To subtract 10 from 1101, you say "since 1 is larger than 0, I have to borrow 1 from the next larger place. That's 1 from the 1000s place (which is really 8). 8- 1= 7 so you have 7 in the 1000s place. Borrowing 1 from the 100s place (really 4) gives 3 in the 100s place. 3- 0= 3 so you have 3 in the 100s place. Borrowing 1 from the 10s place (really 2) gives 1 in the 10s place.
  • #1
transgalactic
1,395
0
i can't understand how it works:
i have two bit numbers (x1 x0 ,y1 y0) which are needed to be subtructed

i can't understand why
x1 x0 y1 y0 | B D1 D2
0 0 0 1 | 1 1 0
0 0 1 0 | 1 0 1
0 0 1 1 | X X X


i can't understand these arithmetics
the first one is 0-1=-1
so in base 3 the resolt is should be three but i can't understand what meen Borrow=1
and the resolt 10
i don't understand how did they desided that

and why we have don't cares on the third example
 
Physics news on Phys.org
  • #2
transgalactic said:
i can't understand how it works:
i have two bit numbers (x1 x0 ,y1 y0) which are needed to be subtructed

i can't understand why
x1 x0 y1 y0 | B D1 D2
0 0 0 1 | 1 1 0
0 0 1 0 | 1 0 1
0 0 1 1 | X X X


i can't understand these arithmetics
the first one is 0-1=-1
so in base 3 the resolt is should be three but i can't understand what meen Borrow=1
and the resolt 10
i don't understand how did they desided that

and why we have don't cares on the third example
Base 3? It looks to me like you are working in base 2!

However, even in base 3, the "result" of a calculation is never "3". It might be 103 (where the 3 indicates the number is written in base 3) but the only digits ("trigits"?) in base 3 are 0, 1, and 2.

Oh, wait, I see. You are doing base 2, binary, arithmetic, but assuming that you can only keep 3 bits, the first being the "sign bit". What you are you are doing is is binary arithmetic (base 2) with the computer notation "two's complement" for negative numbers. Looks like a very simple example of what happens in a computer with 16 bits per number.

Specifically, 0- 1= -1 whether you are in decimal or binary. In "twos complement" negative numbers are represented by having the first bit 1 (positive numbers always have the first bit 0. It's called the "sign bit".) and the rest of the bits the complement of the corresponding positive number. The number "1" would be 001 in this form so "-1" is : first the "sign bit" becomes 1, the the complement of 01 is 10, so -1 is represented by 110.

For the second problem, 0- 10= -10 so the "sign bit" becomes 1 and the complement of 10 is 01: -2 is represented by 101.

For the third, 0- 11= -11 so the "sign bit" becomes 1 and the complement of 11 is 00. The result is 100.

The advantage of "twos complement" is that you don't have to "borrow". But if you want to use "borrowing", its exactly what you learned in elementary school. To subtract 14 from 31 you think "since 4 is larger than 1, I have to borrow 10 from the 10s place. Of course, the "3" in the 10s place really represents 30. Borrowing 10 from the 10s place leave 20- so "2" in the 10s place- and gives 11 in the units place. 11- 4= 7 so you have 7 in the units place. 2- 1= 1 so you have 1 in the 10s place: 31- 14= 17.

It's exactly the same in binary.
 
  • #3


Base 3 subtraction works in a similar way to base 10 subtraction, but instead of borrowing 10 from the next place value, we borrow 3. In base 3, the numbers range from 0 to 2, so when we subtract 1 from 0, we need to borrow 3 from the next place value. This is why the result is 3 in base 10, but 10 in base 3.

In the first example, we are subtracting 1 from 0, so we need to borrow 3 from the next place value. This is why the result is 1 in the first place, and the borrow value is 1. The second place value remains 0, as there is no need to borrow from it.

In the second example, we are subtracting 2 from 1, so we need to borrow 3 from the next place value. This is why the result is 0 in the first place, and the borrow value is 1. The second place value becomes 2, as we have borrowed 3 from it.

In the third example, we are subtracting 3 from 3, which is the same as subtracting 0. In this case, there is no need to borrow from the next place value, so the result is 0 and the borrow value is 0. This is why we have don't cares in the third example, as the result and borrow values are not relevant in this case.

I hope this explanation helps you understand how base 3 subtraction works. It is important to keep in mind that in base 3, the numbers range from 0 to 2, so when we subtract 1 from 0, we need to borrow 3 from the next place value. This is why the result is 3 in base 10, but 10 in base 3.
 

1. What is base 3 subtraction?

Base 3 subtraction is a mathematical operation in which two numbers in base 3 are subtracted from each other to find the difference between them.

2. How is base 3 subtraction different from regular subtraction?

Base 3 subtraction is different from regular subtraction in that it follows the rules of base 3 arithmetic, where the digits range from 0 to 2 instead of 0 to 9. This means that carrying over numbers to the next place value occurs after reaching the digit 2 instead of 9.

3. What are the steps for performing base 3 subtraction?

To perform base 3 subtraction, follow these steps:
1. Write the larger number on top and the smaller number below it.
2. Starting from the rightmost digit, subtract the digits in the same place value.
3. If the digit on the bottom is larger than the one on the top, borrow from the next place value.
4. Continue subtracting each digit, borrowing if necessary, until all digits have been subtracted.
5. Write the resulting digits in base 3 form.

4. What is the result of base 3 subtraction?

The result of base 3 subtraction is a number in base 3 form, which may contain one or more digits. This number represents the difference between the two numbers that were subtracted.

5. What is the significance of base 3 subtraction in scientific research?

Base 3 subtraction is significant in scientific research as it is a fundamental mathematical operation used in various fields, such as computer science, physics, and chemistry. It allows for accurate calculations and analysis of data in a different number system, which can be beneficial in certain applications.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
881
  • Engineering and Comp Sci Homework Help
Replies
1
Views
940
  • Engineering and Comp Sci Homework Help
Replies
7
Views
888
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Programming and Computer Science
Replies
2
Views
2K
Replies
1
Views
543
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
997
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top