why balanced ternary exists, what is the problem with ternary The 2019 Stack Overflow Developer Survey Results Are InIs there a formula that can scale to find linear combinations that equal a sum?Is it known or new?modulo version of the quadratic formula and Euler's criterionUnexpected Probability Theory UsesShow that every nonzero integer has balanced ternary expansion?Converting Unbalanced Ternary Numbers to Balanced Ternary NumberPythagorean Triples : Show that exactly one of $x$, $y$, and $z$ is divisible by $5$Is the $mathbbQ_2$- Space$ (mathbbQ_2[zeta], trace(cxy))$ hyperbolic?Conductor of a subringApproximating a decimal with a fraction (32-bit fixed point to two 23-bit numbers). Think binary, ease of computation.
Is Cinnamon a desktop environment or a window manager? (Or both?)
I am an eight letter word. What am I?
Relationship between Gromov-Witten and Taubes' Gromov invariant
Why doesn't shell automatically fix "useless use of cat"?
How do I free up internal storage if I don't have any apps downloaded?
How come people say “Would of”?
What's the name of these plastic connectors
Deal with toxic manager when you can't quit
Can a flute soloist sit?
What does Linus Torvalds mean when he says that Git "never ever" tracks a file?
Is it okay to consider publishing in my first year of PhD?
What do I do when my TA workload is more than expected?
How to notate time signature switching consistently every measure
Geography at the pixel level
Can withdrawing asylum be illegal?
Getting crown tickets for Statue of Liberty
writing variables above the numbers in tikz picture
How to type a long/em dash `—`
What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?
What is this sharp, curved notch on my knife for?
Why can't devices on different VLANs, but on the same subnet, communicate?
Old scifi movie from the 50s or 60s with men in solid red uniforms who interrogate a spy from the past
A word that means fill it to the required quantity
Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?
why balanced ternary exists, what is the problem with ternary
The 2019 Stack Overflow Developer Survey Results Are InIs there a formula that can scale to find linear combinations that equal a sum?Is it known or new?modulo version of the quadratic formula and Euler's criterionUnexpected Probability Theory UsesShow that every nonzero integer has balanced ternary expansion?Converting Unbalanced Ternary Numbers to Balanced Ternary NumberPythagorean Triples : Show that exactly one of $x$, $y$, and $z$ is divisible by $5$Is the $mathbbQ_2$- Space$ (mathbbQ_2[zeta], trace(cxy))$ hyperbolic?Conductor of a subringApproximating a decimal with a fraction (32-bit fixed point to two 23-bit numbers). Think binary, ease of computation.
$begingroup$
Recently, I countered a problem of representing data in ternary. I came to know there exists ternary and balanced ternary representation.
It is my best understanding that balanced ternary helps in computation in some way, exactly how, I do not know.
Why exactly does "balanced" ternary exist? What is the characteristic of standard ternary that makes it "unbalanced"?
number-theory
$endgroup$
add a comment |
$begingroup$
Recently, I countered a problem of representing data in ternary. I came to know there exists ternary and balanced ternary representation.
It is my best understanding that balanced ternary helps in computation in some way, exactly how, I do not know.
Why exactly does "balanced" ternary exist? What is the characteristic of standard ternary that makes it "unbalanced"?
number-theory
$endgroup$
$begingroup$
Presumably it has the name "balanced" because the digits are symmetric around $0$ no? As for why that's computationally useful I dunno. Wikipedia seems to comment on that.
$endgroup$
– arctic tern
Aug 10 '16 at 8:02
$begingroup$
Wikipedia says that balanced ternary is "useful for comparison logic".
$endgroup$
– 5xum
Aug 10 '16 at 8:27
2
$begingroup$
As two comments have already pointed out, the Wikipedia article you linked to yourself provides several reasons for using this representation. It's not clear what you're asking beyond this. If you don't understand some of the advantages pointed out in the Wikipedia article, you should focus the question on the aspects that you don't understand.
$endgroup$
– joriki
Aug 10 '16 at 9:31
$begingroup$
although a google search with "balanced ternary" brings numerous answer, very few of them deal with even possible applications. An exception:(homepage.cs.uiowa.edu/~jones/ternary/arith.shtml)
$endgroup$
– Jean Marie
Aug 10 '16 at 10:26
$begingroup$
Unlike ternary, in balanced ternary you do not need separate "positive" and "negative" cases, you get all integers in one system.
$endgroup$
– GEdgar
Jan 4 '17 at 1:27
add a comment |
$begingroup$
Recently, I countered a problem of representing data in ternary. I came to know there exists ternary and balanced ternary representation.
It is my best understanding that balanced ternary helps in computation in some way, exactly how, I do not know.
Why exactly does "balanced" ternary exist? What is the characteristic of standard ternary that makes it "unbalanced"?
number-theory
$endgroup$
Recently, I countered a problem of representing data in ternary. I came to know there exists ternary and balanced ternary representation.
It is my best understanding that balanced ternary helps in computation in some way, exactly how, I do not know.
Why exactly does "balanced" ternary exist? What is the characteristic of standard ternary that makes it "unbalanced"?
number-theory
number-theory
asked Aug 10 '16 at 8:00
AdornAdorn
1086
1086
$begingroup$
Presumably it has the name "balanced" because the digits are symmetric around $0$ no? As for why that's computationally useful I dunno. Wikipedia seems to comment on that.
$endgroup$
– arctic tern
Aug 10 '16 at 8:02
$begingroup$
Wikipedia says that balanced ternary is "useful for comparison logic".
$endgroup$
– 5xum
Aug 10 '16 at 8:27
2
$begingroup$
As two comments have already pointed out, the Wikipedia article you linked to yourself provides several reasons for using this representation. It's not clear what you're asking beyond this. If you don't understand some of the advantages pointed out in the Wikipedia article, you should focus the question on the aspects that you don't understand.
$endgroup$
– joriki
Aug 10 '16 at 9:31
$begingroup$
although a google search with "balanced ternary" brings numerous answer, very few of them deal with even possible applications. An exception:(homepage.cs.uiowa.edu/~jones/ternary/arith.shtml)
$endgroup$
– Jean Marie
Aug 10 '16 at 10:26
$begingroup$
Unlike ternary, in balanced ternary you do not need separate "positive" and "negative" cases, you get all integers in one system.
$endgroup$
– GEdgar
Jan 4 '17 at 1:27
add a comment |
$begingroup$
Presumably it has the name "balanced" because the digits are symmetric around $0$ no? As for why that's computationally useful I dunno. Wikipedia seems to comment on that.
$endgroup$
– arctic tern
Aug 10 '16 at 8:02
$begingroup$
Wikipedia says that balanced ternary is "useful for comparison logic".
$endgroup$
– 5xum
Aug 10 '16 at 8:27
2
$begingroup$
As two comments have already pointed out, the Wikipedia article you linked to yourself provides several reasons for using this representation. It's not clear what you're asking beyond this. If you don't understand some of the advantages pointed out in the Wikipedia article, you should focus the question on the aspects that you don't understand.
$endgroup$
– joriki
Aug 10 '16 at 9:31
$begingroup$
although a google search with "balanced ternary" brings numerous answer, very few of them deal with even possible applications. An exception:(homepage.cs.uiowa.edu/~jones/ternary/arith.shtml)
$endgroup$
– Jean Marie
Aug 10 '16 at 10:26
$begingroup$
Unlike ternary, in balanced ternary you do not need separate "positive" and "negative" cases, you get all integers in one system.
$endgroup$
– GEdgar
Jan 4 '17 at 1:27
$begingroup$
Presumably it has the name "balanced" because the digits are symmetric around $0$ no? As for why that's computationally useful I dunno. Wikipedia seems to comment on that.
$endgroup$
– arctic tern
Aug 10 '16 at 8:02
$begingroup$
Presumably it has the name "balanced" because the digits are symmetric around $0$ no? As for why that's computationally useful I dunno. Wikipedia seems to comment on that.
$endgroup$
– arctic tern
Aug 10 '16 at 8:02
$begingroup$
Wikipedia says that balanced ternary is "useful for comparison logic".
$endgroup$
– 5xum
Aug 10 '16 at 8:27
$begingroup$
Wikipedia says that balanced ternary is "useful for comparison logic".
$endgroup$
– 5xum
Aug 10 '16 at 8:27
2
2
$begingroup$
As two comments have already pointed out, the Wikipedia article you linked to yourself provides several reasons for using this representation. It's not clear what you're asking beyond this. If you don't understand some of the advantages pointed out in the Wikipedia article, you should focus the question on the aspects that you don't understand.
$endgroup$
– joriki
Aug 10 '16 at 9:31
$begingroup$
As two comments have already pointed out, the Wikipedia article you linked to yourself provides several reasons for using this representation. It's not clear what you're asking beyond this. If you don't understand some of the advantages pointed out in the Wikipedia article, you should focus the question on the aspects that you don't understand.
$endgroup$
– joriki
Aug 10 '16 at 9:31
$begingroup$
although a google search with "balanced ternary" brings numerous answer, very few of them deal with even possible applications. An exception:(homepage.cs.uiowa.edu/~jones/ternary/arith.shtml)
$endgroup$
– Jean Marie
Aug 10 '16 at 10:26
$begingroup$
although a google search with "balanced ternary" brings numerous answer, very few of them deal with even possible applications. An exception:(homepage.cs.uiowa.edu/~jones/ternary/arith.shtml)
$endgroup$
– Jean Marie
Aug 10 '16 at 10:26
$begingroup$
Unlike ternary, in balanced ternary you do not need separate "positive" and "negative" cases, you get all integers in one system.
$endgroup$
– GEdgar
Jan 4 '17 at 1:27
$begingroup$
Unlike ternary, in balanced ternary you do not need separate "positive" and "negative" cases, you get all integers in one system.
$endgroup$
– GEdgar
Jan 4 '17 at 1:27
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
I don't see it mentioned on the Wikipedia page, but my very first thought on learning of balanced ternary was its obvious application to a weighing scale riddle I encountered once:
Given a balance scale and a set of exactly four weights (with whole number weights when measured in ounces), you would like to be able to measure 1 ounce, 2 ounces, 3 ounces, and so on. What should the measures of the four weights be to allow you to measure a maximum of sequential whole number weights?
The answer is that you can measure all exact weights from $1$ to $40$ if the four weights have measures $1, 3, 9, 27$.
Balanced ternary makes this very obvious and also represents, for each number, the placement of weights so as to measure an object with any specified measurement.
As a commentary, reasonably bright students who've never encountered balanced ternary sometimes think of binary as a first approach when asked this riddle, in which case they come up with the incorrect solution $15$ using the four weights $1, 2, 4, 8$.
Ternary does not have obvious application to this riddle. Balanced ternary applies easily: You can either put a weight on one side of the balance scale, or on the other side, or leave it off of the scale. (But you can't put two of a single weight on one side, as would be denoted by regular ternary.)
$endgroup$
add a comment |
$begingroup$
Some early computers used balanced ternary at a very base level, so that instead of using bits with a value of 1 or 0 (charge or no charge), they used 'trits' with values of -1, 0, or 1 (negative charge, no charge, or positive charge). This has some advantages, but it did not catch on.
$endgroup$
add a comment |
$begingroup$
To answer this question, I will first address the issue of representing negative numbers under binary.
The naive way to do this would be to have a single bit to designate a number to be negative. This has a couple of major disadvantages though, the two biggest being (1) You have two values for zero, a "positive" zero, and a "negative" zero, and (2) there is no easy way to add a negative number to a positive one.
Modern computers overcome this issue by converting negative numbers to "2's compliment". The most intuitive way to understand this is to imagine a byte consisting of all 1 bits; adding 1 to this would set all these values to 0 with an overflow bit of 1. In 2's compliment, we use this as "-1", and count down from there to get our negative numbers.
The nice thing about this approach is that we can use the same logical mechanisms to add two numbers, regardless of whether they are positive or negative.
Theoretically, you can represent negative numbers in ternary by using a "3's compliment", or even in decimal using "10's compliment" (I had done so, just for fun, a couple of weeks ago, which helped me get a better feel for 2's compliment), but balanced ternary is another way we could do it as well, with the added bonus that it's easy to convert a number from positive to negative. (Just change the 1's to -1's and vice versa.)
I would add that balanced ternary is a surprisingly beautiful answer to this problem. There's something pretty amazing about a number system that can represent both positive and negative numbers in such a symmetrical way!
New contributor
alpheus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1887942%2fwhy-balanced-ternary-exists-what-is-the-problem-with-ternary%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
I don't see it mentioned on the Wikipedia page, but my very first thought on learning of balanced ternary was its obvious application to a weighing scale riddle I encountered once:
Given a balance scale and a set of exactly four weights (with whole number weights when measured in ounces), you would like to be able to measure 1 ounce, 2 ounces, 3 ounces, and so on. What should the measures of the four weights be to allow you to measure a maximum of sequential whole number weights?
The answer is that you can measure all exact weights from $1$ to $40$ if the four weights have measures $1, 3, 9, 27$.
Balanced ternary makes this very obvious and also represents, for each number, the placement of weights so as to measure an object with any specified measurement.
As a commentary, reasonably bright students who've never encountered balanced ternary sometimes think of binary as a first approach when asked this riddle, in which case they come up with the incorrect solution $15$ using the four weights $1, 2, 4, 8$.
Ternary does not have obvious application to this riddle. Balanced ternary applies easily: You can either put a weight on one side of the balance scale, or on the other side, or leave it off of the scale. (But you can't put two of a single weight on one side, as would be denoted by regular ternary.)
$endgroup$
add a comment |
$begingroup$
I don't see it mentioned on the Wikipedia page, but my very first thought on learning of balanced ternary was its obvious application to a weighing scale riddle I encountered once:
Given a balance scale and a set of exactly four weights (with whole number weights when measured in ounces), you would like to be able to measure 1 ounce, 2 ounces, 3 ounces, and so on. What should the measures of the four weights be to allow you to measure a maximum of sequential whole number weights?
The answer is that you can measure all exact weights from $1$ to $40$ if the four weights have measures $1, 3, 9, 27$.
Balanced ternary makes this very obvious and also represents, for each number, the placement of weights so as to measure an object with any specified measurement.
As a commentary, reasonably bright students who've never encountered balanced ternary sometimes think of binary as a first approach when asked this riddle, in which case they come up with the incorrect solution $15$ using the four weights $1, 2, 4, 8$.
Ternary does not have obvious application to this riddle. Balanced ternary applies easily: You can either put a weight on one side of the balance scale, or on the other side, or leave it off of the scale. (But you can't put two of a single weight on one side, as would be denoted by regular ternary.)
$endgroup$
add a comment |
$begingroup$
I don't see it mentioned on the Wikipedia page, but my very first thought on learning of balanced ternary was its obvious application to a weighing scale riddle I encountered once:
Given a balance scale and a set of exactly four weights (with whole number weights when measured in ounces), you would like to be able to measure 1 ounce, 2 ounces, 3 ounces, and so on. What should the measures of the four weights be to allow you to measure a maximum of sequential whole number weights?
The answer is that you can measure all exact weights from $1$ to $40$ if the four weights have measures $1, 3, 9, 27$.
Balanced ternary makes this very obvious and also represents, for each number, the placement of weights so as to measure an object with any specified measurement.
As a commentary, reasonably bright students who've never encountered balanced ternary sometimes think of binary as a first approach when asked this riddle, in which case they come up with the incorrect solution $15$ using the four weights $1, 2, 4, 8$.
Ternary does not have obvious application to this riddle. Balanced ternary applies easily: You can either put a weight on one side of the balance scale, or on the other side, or leave it off of the scale. (But you can't put two of a single weight on one side, as would be denoted by regular ternary.)
$endgroup$
I don't see it mentioned on the Wikipedia page, but my very first thought on learning of balanced ternary was its obvious application to a weighing scale riddle I encountered once:
Given a balance scale and a set of exactly four weights (with whole number weights when measured in ounces), you would like to be able to measure 1 ounce, 2 ounces, 3 ounces, and so on. What should the measures of the four weights be to allow you to measure a maximum of sequential whole number weights?
The answer is that you can measure all exact weights from $1$ to $40$ if the four weights have measures $1, 3, 9, 27$.
Balanced ternary makes this very obvious and also represents, for each number, the placement of weights so as to measure an object with any specified measurement.
As a commentary, reasonably bright students who've never encountered balanced ternary sometimes think of binary as a first approach when asked this riddle, in which case they come up with the incorrect solution $15$ using the four weights $1, 2, 4, 8$.
Ternary does not have obvious application to this riddle. Balanced ternary applies easily: You can either put a weight on one side of the balance scale, or on the other side, or leave it off of the scale. (But you can't put two of a single weight on one side, as would be denoted by regular ternary.)
answered Jan 4 '17 at 0:57
WildcardWildcard
2,6451028
2,6451028
add a comment |
add a comment |
$begingroup$
Some early computers used balanced ternary at a very base level, so that instead of using bits with a value of 1 or 0 (charge or no charge), they used 'trits' with values of -1, 0, or 1 (negative charge, no charge, or positive charge). This has some advantages, but it did not catch on.
$endgroup$
add a comment |
$begingroup$
Some early computers used balanced ternary at a very base level, so that instead of using bits with a value of 1 or 0 (charge or no charge), they used 'trits' with values of -1, 0, or 1 (negative charge, no charge, or positive charge). This has some advantages, but it did not catch on.
$endgroup$
add a comment |
$begingroup$
Some early computers used balanced ternary at a very base level, so that instead of using bits with a value of 1 or 0 (charge or no charge), they used 'trits' with values of -1, 0, or 1 (negative charge, no charge, or positive charge). This has some advantages, but it did not catch on.
$endgroup$
Some early computers used balanced ternary at a very base level, so that instead of using bits with a value of 1 or 0 (charge or no charge), they used 'trits' with values of -1, 0, or 1 (negative charge, no charge, or positive charge). This has some advantages, but it did not catch on.
answered Oct 17 '18 at 19:37
Marc MoskowitzMarc Moskowitz
111
111
add a comment |
add a comment |
$begingroup$
To answer this question, I will first address the issue of representing negative numbers under binary.
The naive way to do this would be to have a single bit to designate a number to be negative. This has a couple of major disadvantages though, the two biggest being (1) You have two values for zero, a "positive" zero, and a "negative" zero, and (2) there is no easy way to add a negative number to a positive one.
Modern computers overcome this issue by converting negative numbers to "2's compliment". The most intuitive way to understand this is to imagine a byte consisting of all 1 bits; adding 1 to this would set all these values to 0 with an overflow bit of 1. In 2's compliment, we use this as "-1", and count down from there to get our negative numbers.
The nice thing about this approach is that we can use the same logical mechanisms to add two numbers, regardless of whether they are positive or negative.
Theoretically, you can represent negative numbers in ternary by using a "3's compliment", or even in decimal using "10's compliment" (I had done so, just for fun, a couple of weeks ago, which helped me get a better feel for 2's compliment), but balanced ternary is another way we could do it as well, with the added bonus that it's easy to convert a number from positive to negative. (Just change the 1's to -1's and vice versa.)
I would add that balanced ternary is a surprisingly beautiful answer to this problem. There's something pretty amazing about a number system that can represent both positive and negative numbers in such a symmetrical way!
New contributor
alpheus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
To answer this question, I will first address the issue of representing negative numbers under binary.
The naive way to do this would be to have a single bit to designate a number to be negative. This has a couple of major disadvantages though, the two biggest being (1) You have two values for zero, a "positive" zero, and a "negative" zero, and (2) there is no easy way to add a negative number to a positive one.
Modern computers overcome this issue by converting negative numbers to "2's compliment". The most intuitive way to understand this is to imagine a byte consisting of all 1 bits; adding 1 to this would set all these values to 0 with an overflow bit of 1. In 2's compliment, we use this as "-1", and count down from there to get our negative numbers.
The nice thing about this approach is that we can use the same logical mechanisms to add two numbers, regardless of whether they are positive or negative.
Theoretically, you can represent negative numbers in ternary by using a "3's compliment", or even in decimal using "10's compliment" (I had done so, just for fun, a couple of weeks ago, which helped me get a better feel for 2's compliment), but balanced ternary is another way we could do it as well, with the added bonus that it's easy to convert a number from positive to negative. (Just change the 1's to -1's and vice versa.)
I would add that balanced ternary is a surprisingly beautiful answer to this problem. There's something pretty amazing about a number system that can represent both positive and negative numbers in such a symmetrical way!
New contributor
alpheus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
To answer this question, I will first address the issue of representing negative numbers under binary.
The naive way to do this would be to have a single bit to designate a number to be negative. This has a couple of major disadvantages though, the two biggest being (1) You have two values for zero, a "positive" zero, and a "negative" zero, and (2) there is no easy way to add a negative number to a positive one.
Modern computers overcome this issue by converting negative numbers to "2's compliment". The most intuitive way to understand this is to imagine a byte consisting of all 1 bits; adding 1 to this would set all these values to 0 with an overflow bit of 1. In 2's compliment, we use this as "-1", and count down from there to get our negative numbers.
The nice thing about this approach is that we can use the same logical mechanisms to add two numbers, regardless of whether they are positive or negative.
Theoretically, you can represent negative numbers in ternary by using a "3's compliment", or even in decimal using "10's compliment" (I had done so, just for fun, a couple of weeks ago, which helped me get a better feel for 2's compliment), but balanced ternary is another way we could do it as well, with the added bonus that it's easy to convert a number from positive to negative. (Just change the 1's to -1's and vice versa.)
I would add that balanced ternary is a surprisingly beautiful answer to this problem. There's something pretty amazing about a number system that can represent both positive and negative numbers in such a symmetrical way!
New contributor
alpheus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
To answer this question, I will first address the issue of representing negative numbers under binary.
The naive way to do this would be to have a single bit to designate a number to be negative. This has a couple of major disadvantages though, the two biggest being (1) You have two values for zero, a "positive" zero, and a "negative" zero, and (2) there is no easy way to add a negative number to a positive one.
Modern computers overcome this issue by converting negative numbers to "2's compliment". The most intuitive way to understand this is to imagine a byte consisting of all 1 bits; adding 1 to this would set all these values to 0 with an overflow bit of 1. In 2's compliment, we use this as "-1", and count down from there to get our negative numbers.
The nice thing about this approach is that we can use the same logical mechanisms to add two numbers, regardless of whether they are positive or negative.
Theoretically, you can represent negative numbers in ternary by using a "3's compliment", or even in decimal using "10's compliment" (I had done so, just for fun, a couple of weeks ago, which helped me get a better feel for 2's compliment), but balanced ternary is another way we could do it as well, with the added bonus that it's easy to convert a number from positive to negative. (Just change the 1's to -1's and vice versa.)
I would add that balanced ternary is a surprisingly beautiful answer to this problem. There's something pretty amazing about a number system that can represent both positive and negative numbers in such a symmetrical way!
New contributor
alpheus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
alpheus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered Apr 7 at 20:44
alpheusalpheus
1
1
New contributor
alpheus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
alpheus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
alpheus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1887942%2fwhy-balanced-ternary-exists-what-is-the-problem-with-ternary%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Presumably it has the name "balanced" because the digits are symmetric around $0$ no? As for why that's computationally useful I dunno. Wikipedia seems to comment on that.
$endgroup$
– arctic tern
Aug 10 '16 at 8:02
$begingroup$
Wikipedia says that balanced ternary is "useful for comparison logic".
$endgroup$
– 5xum
Aug 10 '16 at 8:27
2
$begingroup$
As two comments have already pointed out, the Wikipedia article you linked to yourself provides several reasons for using this representation. It's not clear what you're asking beyond this. If you don't understand some of the advantages pointed out in the Wikipedia article, you should focus the question on the aspects that you don't understand.
$endgroup$
– joriki
Aug 10 '16 at 9:31
$begingroup$
although a google search with "balanced ternary" brings numerous answer, very few of them deal with even possible applications. An exception:(homepage.cs.uiowa.edu/~jones/ternary/arith.shtml)
$endgroup$
– Jean Marie
Aug 10 '16 at 10:26
$begingroup$
Unlike ternary, in balanced ternary you do not need separate "positive" and "negative" cases, you get all integers in one system.
$endgroup$
– GEdgar
Jan 4 '17 at 1:27