Hello all,
I think I need a nudge in the right direction. I need to return (2) 16 bit unsigned ints from a 32 bit unsigned int.
Am I on the right track with this?
Thanks guys,
C
I think I need a nudge in the right direction. I need to return (2) 16 bit unsigned ints from a 32 bit unsigned int.
Am I on the right track with this?
B4X:
Sub Upper16bits(str32Bits As String)
Dim lng32Bits As Long
lng32Bits = str32Bits '0 - 4294967296 (Unsigned 32 bit)
Dim intUpper16Bits As Int
intUpper16Bits = Bit.ShiftRight(lng32Bits,16) '0 - 65536 (Unsigned 16 bit)
Dim intLower16Bits As Int
intLower16Bits = Bit.And(lng32Bits,0xFFFF) '0 - 65536 (Unsigned 16 bit)
End Sub
C