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;








-1















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?










share|improve this question






















  • 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

















-1















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?










share|improve this question






















  • 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













-1












-1








-1








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?










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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












1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    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.






    share|improve this answer



























      0














      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.






      share|improve this answer

























        0












        0








        0







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 22 at 5:43









        jmcilhinneyjmcilhinney

        26.5k32033




        26.5k32033





























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

            Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?