Why does -673.4 in IEEE-754 end with 10 and not 01?
Sign bit is 1.
Converted to binary it is: 1010100001.01100110011001100110011001100110...
Exponent is 136=10001000
So shouldn't full number be: 1 10001000 01010000101100110011001
Instead by calculators I get: 1 10001000 01010000101100110011010
So why did last two bits change, and what is algorithm behind it (how can I calculate how and when do they change)?
The number given by calculators converts back to decimal as -673.4000244140625
, or 24.4 millionths too high.
The number you propose as the "proper" encoding converts back as -673.3999633789062
, or 36.6 millionths too low.
They're both very close to the number you wanted, but the uexpected one is marginally closer.
IEEE rounding usually rounds to the nearest number, although the scheme you imagined, "truncation" or round towards zero, is also defined and used in some devices or applications.