hex operation help

L

Lenny

hi
I have a Ulong value like this 0x0001e8480003d08f
and I need to division of the first 8 digit number with the second 8 digit
number.
0001e848 / 0003d08f
in c#
can you help me?
thanks
Luca
 
D

Duy Lam

Lenny said:
hi
I have a Ulong value like this 0x0001e8480003d08f
and I need to division of the first 8 digit number with the second 8
digit number.
0001e848 / 0003d08f
in c#
can you help me?
thanks
Luca

Try this code:

ulong value = 0x11223344aabbccdd;
ulong first4Bytes =value>>32;
ulong last4Bytes = value & 0x00000000ffffffff;
Console.WriteLine(value.ToString("x"));
Console.WriteLine(first4Bytes.ToString("x"));
Console.WriteLine(last4Bytes.ToString("x"));

Hope this help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top