Re:A 220b spreadsheet app in HTML/JS
by Arnavion on Thursday September 28, 2017 @05:55AM
(#15355937)
>Can somebody explain to me how: "a[i]+-~j" is the same as "a[i]+(j+1)" ?
-(~j) = Twos complement of the ones complement of j
Twos complement = ones complement + 1
So twos complement of (ones complement of j) = ones complement of (ones complement of j) + 1 = j + 1
Am I missing something or isn't the "+" unnecessary? i.e. a[i]+-~j = a[i]-~j
Sure, i explained it here earlier today: https://github.com/xem/sheet/issues/4
Can somebody explain to me how: "a[i]+-~j" is the same as "a[i]+(j+1)" ?