1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to store a 64 bit integer into 4x16 bit integers ?

Discussion in 'C' started by Thaus015, Feb 7, 2019.

  1. Thaus015

    Thaus015 New Member

    Joined:
    Jun 15, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Female
    Hello, I need your to code the following logic. I am not expert in programming side but I'm pretty sure its just a matter of some bitwise operations, I'm just not entirely sure of exactly what I should be doing.

    Input of Block is 64 bits, For example A=64
    Output of block should be x =16
    y=16
    z=16
    s=16

    How can this logic can be implemented in C++. Please share the logic.
     

Share This Page