Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^8: Split any number into string of 8-bit hex values (=1 byte)

by soonix (Canon)
on Aug 31, 2021 at 07:04 UTC ( [id://11136270]=note: print w/replies, xml ) Need Help??


in reply to Re^7: Split any number into string of 8-bit hex values (=1 byte)
in thread Split any number into string of 8-bit hex values (=1 byte)

Note that for 200, C8 is a negative number, so the 00 is required to make it so that C8 00 is positive.
Ah, that might be the reason for that odd trailing '00' in the OP
  • Comment on Re^8: Split any number into string of 8-bit hex values (=1 byte)

Replies are listed 'Best First'.
Re^9: Split any number into string of 8-bit hex values (=1 byte)
by AnomalousMonk (Archbishop) on Aug 31, 2021 at 07:49 UTC

    How does an 8-bit register in an I2C device "know" that an 0xc8 byte started out as 20010 or as -5610? One can make similar arguments about 16- and 32-bit registers.

    I share the misgivings expressed by LanX here.


    Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11136270]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-25 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found