Mathe für microController

two's complement - 8Bit > decimal

you can store numbers from -55 to + 125 in one Byte . This is what dallas DS1821 Temp.Sensor  make's.

+125 01111101 7Dh

Two's.asm

Test it with AVR-Studio

0 00000000 00h
-55 11001001 C9h

 

avrprojekte ]