Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

DS1820 binary

Status
Not open for further replies.
What don't you understand? It's just BCD numbers.

Edit, 75 would be 150 converted to BCD, so 0x96.

Mike.
 
Last edited:
does it mean

if 1111 1111 = -

and 0000 0000 = +

if yes

then what is 110 c ?
hi TT,
Think about it.:)

the least significant BIT is equal to 0.5C
So 110C = 220decimal which equals hex.........................??????
 
You need to understand 2's compliment numbers.

In 2's comp the leftmost bit is assumed to be negative.
All other bits are positive.

In a 4 bit binary number the bit values are

8 4 2 1

if we choose 2's comp representation they are

-8 4 2 1

So a decimal 1 would be

0001

and a decimal -1 is
11111
because -8 +4 +2 +1 = -1 (we just added the bit values where we had a 1)

a decimal -4 would be
1100
because -8 +4 = -4

Regardless of the number of bits it is always the leftmost bit that is assumed to be negative.

But as Eric said in the case of this sensor the rightmost bit is worth .5 rather then 1

.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top