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

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

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