Or, use a float, or, add 1023 then divide by 1024 just as you are to round up.