Talk:Negative base

message: The main page used to claim "Negabinary was first implemented in computer hardware in the experimental Polish computers SKRZAT 1 and BINEG in 1950."  I found an article (Marczynski, R W, "The First Seven Years of Polish Computing" IEEE Annals of the History of Computing, Vol 2, No 1, January 1980), which claims that the first Polish computer was begun in 1953, that BINEG was built in 1957-69, and which makes no mention of SKRZAT.  Therefore I altered the date and removed SKRZAT.  If anyone has any evidence that SKRZAT exists (I can't find any) they can re-edit.  —Preceding unsigned comment added by Maltelauridsbrigge (talk • contribs) 12:19, 6 August 2008 (UTC)
thread_title: Polish computers

message: Who ever said wikipedia editors have no sense of humour? --Sigmundur (talk) 17:05, 10 January 2010 (UTC)
thread_title: Intercal notation

message: I have trouble understanding the alternate addition method for negabinary. The way I understand 1 + 1 causes a carry on position n+1 and an extra carry (higher row) on position n+2. It seems 1+1+1 is nearly identical except the result bit is 1 on that position. But the 3rd column from left ? 1+1+1+1. That's 4, which is 100 in negabinary. Does that mean a carry (lower row ? higher row ?) is propagated to position n+3 ? --89.73.166.93 (talk) 15:30, 13 November 2017 (UTC)
replies: text: I found it confusing to find the leftmost carried value in the "carry" row when the rest of the example put such values in the "extra carry" row. I've moved it (https://en.wikipedia.org/w/index.php?title=Negative_base&oldid=1167324670). Johntobey (talk) 02:37, 27 July 2023 (UTC)
thread_title:  Addition 

message: "To negate a number, compute 0 minus the number." The purport of the preceding paragraph is, "to compute 0 minus a number, negate the number".  —Preceding unsigned comment added by 83.87.70.180 (talk) 10:30, 14 January 2011 (UTC)
thread_title:  Subtraction 

message: "based on ideæ from..." ...ideæ? Ideæ?!
Surely the word is "ideas". AYFKM... 87.113.138.192 (talk) 23:05, 24 May 2014 (UTC)
replies: text: If it's Latin (and I have a sneaking suspicion it might be Greek) I reckon ablative (locative or instrumental) ideīs would be better than nominative ideæ. :P —Tamfang (talk) 03:42, 25 May 2014 (UTC)
thread_title:  OK, what... 

message: Sbasson, I think you'll find that -3 × 2 + 1 = -5; from which it follows that floor(-5/-3) is 2, and the remainder is 1.  (Remember that for the present purpose the remainder must be nonnegative.)  If you disagree with this arithmetic, please explain here, rather than cluttering up the article. —Tamfang (talk) 08:27, 1 June 2014 (UTC)
replies: text: er, no, floor(-5/-3) = floor(5/3) = 1; we need a different function here. —Tamfang (talk) 17:39, 3 February 2015 (UTC)
thread_title:  debates belong here 

message: So will it be safe for me to get rid of the ridiculous, irrelevant INTERCAL reference? Nobody will understand it except people who already get the joke. Wikipedia is not supposed to be for in-jokes. Jaysbro (talk) 17:57, 30 April 2015 (UTC)
replies: text: Done. Next time, just do it - think "EAFP - Easier To Ask For Forgiveness Than To Ask For Permission". By the way, the statement was actually wrong. Regards, Hayazin (talk) 17:48, 19 August 2018 (UTC)
thread_title:  Trolling doesn't belong in Wikipedia 

message: What does the attribution "due to D. Librik (Szudzik)" mean? Are Librik and Szudzik two people? Is Szudzik the maiden name of Librik? Does Librik work for the university of Szudzik?  — Preceding unsigned comment added by 212.88.248.145 (talk) 03:02, 18 October 2016 (UTC)
thread_title:  Conversions method: names 

message: I see from reading this talk page that some people are having trouble understanding a carry or a borrow of 11 affecting two subsequent columns, and indeed I couldn't get my head round it either.
I wrote a paper on numbers to the base -2 back in the 80s and I tried to make it simple so that people could more easily understand how addition and subtraction work. The thing that makes it easier to comprehend is to realise that a carry of 11 to subsequent columns is actually a carry of -1, and a carry of -1 is a borrow of 1. Similarly, in subtraction, a borrow of 11 is a borrow of -1, which is a carry of 1.
Using this idea, the rules for addition and subtraction only affect one subsequent column and not two.
Here is an extract from the addition section of what I wrote all those years ago:
The first three addition rules are the same as for base +2:
Rule 1: 0+0 = 0
Rule 2: 0+1 = 1
Rule 3: 1+0 = 1
In base +2, the fourth rule is 1+1 = 0 carry 1. In base -2 this rule is slightly different:
1+1 = 0 carry 11
If you try adding 1 and 1 using this rule you get 110 which is 2 which is correct.
Clearly, a carry of 11 makes computation of subsequent columns more and more difficult.
But 11 is the base -2 representation of -1. So a carry of 11 is equivalent to a carry of -1 or a
borrow of 1. So, we can change the fourth rule to:
Rule 4: 1+1 = 0 borrow 1
This makes the arithmetic easier as only the next column is affected, but now what happens
when you get a borrow from a column containing two zeros, ie 0+0-1? This is now a base -2
subtraction. 0-1 in base -2 is 1 borrow 11 which is the same as 1 carry 1. So we need to use
one of the rules of base -2 subtraction as a rule for base -2 addition:
Rule 5: 0-1 = 1 carry 1
Adding 1 and 1 now works again:
1+1 = 0 borrow 1
0+0-1 = 1 carry 1
0+0+1 = 1
Answer: 110
Finally, we now need a rule which allows for a carry to a column containing two 1s:
Rule 6: 1+1+1 = 1 borrow 1
To see this in action, add 4 and 2:
100
+110
First column: 0+0 = 0
Second column: 0+1 = 1
Third column: 1+1 = 0 borrow 1
Fourth column: 0+0-1 = 1 carry 1
Fifth column: 0+0+1 = 1
Answer: 11010 = 6
Now add 5 to 5:
101
+101
First column: 1+1 = 0 borrow 1
Second column: 0+0-1 = 1 carry 1
Third column: 1+1+1 = 1 borrow 1
Fourth column: 0+0-1 = 1 carry 1
Fifth column: 0+0+1 = 1
Answer: 11110 = 10 (decimal)
I hope this makes it simpler to understand
The logic circuit for a full adder would be:
The sum is the exclusive OR of all four inputs A EOR B EOR cp EOR bp
The carry is bp AND NOT A AND NOT B
The borrow is (A OR B) AND cp OR A AND B AND NOT bp
Jon Mountfort  — Preceding unsigned comment added by Mrrash (talk • contribs) 14:04, 27 June 2018 (UTC)
thread_title:  Addition and Subtraction 

message: There's an excessive number of example algorithm implementations in the Calculation section. That's appropriate on e.g. Rosetta Code, but not here. I think all of them should be removed except for one, and that one should be should be plain English or pseudocode (or at least a language that's particularly easy to understand even for non-programmers).
73.158.207.251 (talk) 13:32, 9 January 2022 (UTC)
thread_title:  Example implementation code 

message: This article is completely impenetrable to someone who doesn't already know what negative bases are. A better introduction is needed as well as a properly explained basic example. 90.196.143.220 (talk) 17:18, 26 November 2022 (UTC)
thread_title:  Useless 

message: Note that in base -b, it is the rationals of the form x=\dfrac{M}{b^k}+\dfrac{1}{b+1} that have two representations: x can be represented as x=\dfrac{M}{b^k}+0.\dot{0}\dot{(b-1)} or x=\dfrac{M}{b^k}+1+0.\dot{(b-1)}\dot{0}.
To convert x\in\left[-\dfrac{b}{b+1},\dfrac{b^2}{b+1}\right] to base -b, define x0 = x. For each x_i\in\left[-\dfrac{b}{b+1},\dfrac{b^2}{b+1}\right], choose di ∈ {0, 1, ..., b-1} such that x_i-d\in\left[-\dfrac{b}{b+1},\dfrac{1}{b+1}\right], then set x_{i+1} = -b(x_i-d)\in\left[-\dfrac{b}{b+1},\dfrac{b^2}{b+1}\right]. The base-(-b) expansion of x is then d0.d1d2...
Note that for other than the fractions with two representations, the reptend length in base -b of  (with k and n being coprime) is ordm(-b), where m is n with factors of b removed. This would give ordb+1(-b) = 1 for the the fractions with two representations as, but the actual value is 2.
The table is the negadecimal expansions for fractions with denominator ≤ 13. 
Fractions                   	Negadecimal expansions
1/2                         	1.5
1/3, 2/3                    	1., 1.
1/4, 3/4                    	1.85, 1.35
1/5, 2/5, 3/5, 4/5          	1.8, 1.6, 1.4, 1.2
1/6, 5/6                    	1.9, 1.2
1/7, 2/7, 3/7, 4/7, 5/7, 6/7	1., 1., 1., 1., 1., 1.
1/8, 3/8, 5/8, 7/8          	1.935, 1.785, 1.435, 1.285
1/9, 2/9, 4/9, 5/9, 7/9, 8/9	1., 1., 1., 1., 1., 1.
1/11, 2/11, ..., 10/11      	0. = 1., 1., 1., ..., 1.
1/12, 5/12, 7/12, 11/12     	0.09, 1.62, 1.59, 1.12
1/11, 2/13, ..., 12/13      	0., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.
For the irrational numbers, π in base -10 is 4.95961346761020737967..., and e in base -10 is 3.32232223255905537676... 129.104.241.193 (talk) 04:31, 19 May 2024 (UTC)
thread_title:  Negative base fractions