On Tuesday, 24 March 2015 at 17:35:14 UTC, matovitch wrote:
xor it with -1 instead of 1. (-1 is store as 0xfff..f with the
classic modular arithmetic)
Thanks.
On Tuesday, 24 March 2015 at 17:28:50 UTC, Dennis Ritchie wrote:
On Tuesday, 24 March 2015 at 16:35:04 UTC, Ivan Kazmenko wrote:
What exactly is not working?
Everything works. I'm just a little forgotten properties of the
operation xor.
I just wanted to xor 1 each digit in the number of typ
On Tuesday, 24 March 2015 at 16:35:04 UTC, Ivan Kazmenko wrote:
What exactly is not working?
Everything works. I'm just a little forgotten properties of the
operation xor.
I just wanted to xor 1 each digit in the number of type BigInt,
while I would like to store each number in the binary
On Tuesday, 24 March 2015 at 15:45:36 UTC, Dennis Ritchie wrote:
Tell me, please, how can I replace this code?
import std.conv : to;
import std.bigint : BigInt;
import std.string : format;
import std.stdio : writeln;
void main() {
BigInt[10] bitArr;
ulong n = 18_446_724_073_70
On Tuesday, 24 March 2015 at 15:45:36 UTC, Dennis Ritchie wrote:
Tell me, please, how can I replace this code?
import std.conv : to;
import std.bigint : BigInt;
import std.string : format;
import std.stdio : writeln;
void main() {
BigInt[10] bitArr;
ulong n = 18_446_724_073_70
On Tuesday, 24 March 2015 at 15:45:36 UTC, Dennis Ritchie wrote:
Tell me, please, how can I replace this code?
import std.conv : to;
import std.bigint : BigInt;
import std.string : format;
import std.stdio : writeln;
void main() {
BigInt[10] bitArr;
ulong n = 18_446_724_073_70
Tell me, please, how can I replace this code?
import std.conv : to;
import std.bigint : BigInt;
import std.string : format;
import std.stdio : writeln;
void main() {
BigInt[10] bitArr;
ulong n = 18_446_724_073_709_551_614U;
bitArr[0] = format("%b", n).to!BigInt;