hex operation help

  • Thread starter Thread starter Lenny
  • Start date Start date
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
 
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
 
Back
Top