I have some calculations (mainly the time in seconds) where the lengths of time I am working with need to be stored as long. BUt after some calculations I have to load the result into a 16-bit configuration register.
I want to only use the most significant two bytes of the long and load them into this register (so I can preserve the meaning but lose the resolution. Obviously I can't use the bottom two LSBs because I would lose the meaning of the number entirely)
But if I go:
some integer = some long
to use the implicit typecast, does which half does it take? Does it even work properly?
I want to only use the most significant two bytes of the long and load them into this register (so I can preserve the meaning but lose the resolution. Obviously I can't use the bottom two LSBs because I would lose the meaning of the number entirely)
But if I go:
some integer = some long
to use the implicit typecast, does which half does it take? Does it even work properly?