Or, use a float, or, add 1023 then divide by 1024 just as you are to round up.
Mainframe assembler programmer by trade. C coder when I can.