S
shawn bright
hey there all, i have a question concerning making numbers from bytes
and back agian
if i have some numbers:
lo byte = 192
hi byte = 176
i can get the number 12480 like this:
(176 & 127) * 256 + 192 = 12480
but if i start with the 12480, how do i get the two bytes (lo and hi)
that make it up?
i kinda know what i am doing here, but keep getting tripped up
thanks
and back agian
if i have some numbers:
lo byte = 192
hi byte = 176
i can get the number 12480 like this:
(176 & 127) * 256 + 192 = 12480
but if i start with the 12480, how do i get the two bytes (lo and hi)
that make it up?
i kinda know what i am doing here, but keep getting tripped up
thanks