How to append int64 value to biginterger value The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceHow do you set, clear, and toggle a single bit?How to count the number of set bits in a 32-bit integer?What are bitwise shift (bit-shift) operators and how do they work?How to make the default value of a type as Nothing?What is a NullReferenceException, and how do I fix it?filtering a dictionary(of int64, myObject) from a dictionary(of int64, int64)Bitwise operator for simply flipping all bits in an integer?Change byte in Int64Extracting bits with a single multiplicationhow can i make my @Html.ValidationMessageFor work with integer value
How to create a folder symlink that has a different name?
Identify 80s or 90s comics with ripped creatures (not dwarves)
Did the new image of black hole confirm the general theory of relativity?
Why not take a picture of a closer black hole?
Match Roman Numerals
The following signatures were invalid: EXPKEYSIG 1397BC53640DB551
Is 'stolen' appropriate word?
What was the last x86 CPU that did not have the x87 floating-point unit built in?
What's the point in a preamp?
Nested ellipses in tikzpicture: Chomsky hierarchy
What can I do if neighbor is blocking my solar panels intentionally?
What aspect of planet earth must be changed to prevent the industrial revolution?
Circular reasoning in L'Hopital's rule
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
Using dividends to reduce short term capital gains?
How to make Illustrator type tool selection automatically adapt with text length
Why are PDP-7-style microprogrammed instructions out of vogue?
"... to apply for a visa" or "... and applied for a visa"?
Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?
Pretty sure I'm over complicating my loops but unsure how to simplify
Why can I use a list index as an indexing variable in a for loop?
Define a list range inside a list
number sequence puzzle deep six
Solving overdetermined system by QR decomposition
How to append int64 value to biginterger value
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceHow do you set, clear, and toggle a single bit?How to count the number of set bits in a 32-bit integer?What are bitwise shift (bit-shift) operators and how do they work?How to make the default value of a type as Nothing?What is a NullReferenceException, and how do I fix it?filtering a dictionary(of int64, myObject) from a dictionary(of int64, int64)Bitwise operator for simply flipping all bits in an integer?Change byte in Int64Extracting bits with a single multiplicationhow can i make my @Html.ValidationMessageFor work with integer value
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have BigInterger
Dim posBigInt As BigInteger = &H27677495
Also i have in64
Dim int_four As Int64 = &H30034003
I want to append int64 value to big integer value it should be:
posBigInt = &H2767749530034003
how can I accomplish that?
vb.net bit-manipulation bitwise-operators
add a comment |
I have BigInterger
Dim posBigInt As BigInteger = &H27677495
Also i have in64
Dim int_four As Int64 = &H30034003
I want to append int64 value to big integer value it should be:
posBigInt = &H2767749530034003
how can I accomplish that?
vb.net bit-manipulation bitwise-operators
Can you explain why EXACTLY you want to do this? I have provided an answer but using string concatenation for this type of thing feels dirty. Bit-wise operations might be more appropriate but we'd have to know the specifics of the situation to be sure.
– jmcilhinney
Mar 22 at 5:45
@jmcilhinney thanks for your help, simply saying, the posBigInt value - &H27677495 is not static, it can be any 4 bytes. So after i get this 4 bytes i need to this 4 bytes ( in our case it is &H27677495) append &H30034003 and XOR it with &H5003600370038003
– James_BK
Mar 22 at 5:53
add a comment |
I have BigInterger
Dim posBigInt As BigInteger = &H27677495
Also i have in64
Dim int_four As Int64 = &H30034003
I want to append int64 value to big integer value it should be:
posBigInt = &H2767749530034003
how can I accomplish that?
vb.net bit-manipulation bitwise-operators
I have BigInterger
Dim posBigInt As BigInteger = &H27677495
Also i have in64
Dim int_four As Int64 = &H30034003
I want to append int64 value to big integer value it should be:
posBigInt = &H2767749530034003
how can I accomplish that?
vb.net bit-manipulation bitwise-operators
vb.net bit-manipulation bitwise-operators
asked Mar 22 at 5:30
James_BKJames_BK
116
116
Can you explain why EXACTLY you want to do this? I have provided an answer but using string concatenation for this type of thing feels dirty. Bit-wise operations might be more appropriate but we'd have to know the specifics of the situation to be sure.
– jmcilhinney
Mar 22 at 5:45
@jmcilhinney thanks for your help, simply saying, the posBigInt value - &H27677495 is not static, it can be any 4 bytes. So after i get this 4 bytes i need to this 4 bytes ( in our case it is &H27677495) append &H30034003 and XOR it with &H5003600370038003
– James_BK
Mar 22 at 5:53
add a comment |
Can you explain why EXACTLY you want to do this? I have provided an answer but using string concatenation for this type of thing feels dirty. Bit-wise operations might be more appropriate but we'd have to know the specifics of the situation to be sure.
– jmcilhinney
Mar 22 at 5:45
@jmcilhinney thanks for your help, simply saying, the posBigInt value - &H27677495 is not static, it can be any 4 bytes. So after i get this 4 bytes i need to this 4 bytes ( in our case it is &H27677495) append &H30034003 and XOR it with &H5003600370038003
– James_BK
Mar 22 at 5:53
Can you explain why EXACTLY you want to do this? I have provided an answer but using string concatenation for this type of thing feels dirty. Bit-wise operations might be more appropriate but we'd have to know the specifics of the situation to be sure.
– jmcilhinney
Mar 22 at 5:45
Can you explain why EXACTLY you want to do this? I have provided an answer but using string concatenation for this type of thing feels dirty. Bit-wise operations might be more appropriate but we'd have to know the specifics of the situation to be sure.
– jmcilhinney
Mar 22 at 5:45
@jmcilhinney thanks for your help, simply saying, the posBigInt value - &H27677495 is not static, it can be any 4 bytes. So after i get this 4 bytes i need to this 4 bytes ( in our case it is &H27677495) append &H30034003 and XOR it with &H5003600370038003
– James_BK
Mar 22 at 5:53
@jmcilhinney thanks for your help, simply saying, the posBigInt value - &H27677495 is not static, it can be any 4 bytes. So after i get this 4 bytes i need to this 4 bytes ( in our case it is &H27677495) append &H30034003 and XOR it with &H5003600370038003
– James_BK
Mar 22 at 5:53
add a comment |
1 Answer
1
active
oldest
votes
It's a bit dodgy but you could do this:
posBigInt = BigInteger.Parse(posBigInt.ToString("X8") & int_four.ToString("X8"),
NumberStyles.HexNumber)
That's converting both numbers to 8-digit hexadecimal text first, concatenating them and then parsing the result.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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
,
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%2fstackoverflow.com%2fquestions%2f55293408%2fhow-to-append-int64-value-to-biginterger-value%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It's a bit dodgy but you could do this:
posBigInt = BigInteger.Parse(posBigInt.ToString("X8") & int_four.ToString("X8"),
NumberStyles.HexNumber)
That's converting both numbers to 8-digit hexadecimal text first, concatenating them and then parsing the result.
add a comment |
It's a bit dodgy but you could do this:
posBigInt = BigInteger.Parse(posBigInt.ToString("X8") & int_four.ToString("X8"),
NumberStyles.HexNumber)
That's converting both numbers to 8-digit hexadecimal text first, concatenating them and then parsing the result.
add a comment |
It's a bit dodgy but you could do this:
posBigInt = BigInteger.Parse(posBigInt.ToString("X8") & int_four.ToString("X8"),
NumberStyles.HexNumber)
That's converting both numbers to 8-digit hexadecimal text first, concatenating them and then parsing the result.
It's a bit dodgy but you could do this:
posBigInt = BigInteger.Parse(posBigInt.ToString("X8") & int_four.ToString("X8"),
NumberStyles.HexNumber)
That's converting both numbers to 8-digit hexadecimal text first, concatenating them and then parsing the result.
answered Mar 22 at 5:43
jmcilhinneyjmcilhinney
26.5k32033
26.5k32033
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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.
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%2fstackoverflow.com%2fquestions%2f55293408%2fhow-to-append-int64-value-to-biginterger-value%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
Can you explain why EXACTLY you want to do this? I have provided an answer but using string concatenation for this type of thing feels dirty. Bit-wise operations might be more appropriate but we'd have to know the specifics of the situation to be sure.
– jmcilhinney
Mar 22 at 5:45
@jmcilhinney thanks for your help, simply saying, the posBigInt value - &H27677495 is not static, it can be any 4 bytes. So after i get this 4 bytes i need to this 4 bytes ( in our case it is &H27677495) append &H30034003 and XOR it with &H5003600370038003
– James_BK
Mar 22 at 5:53