Shop OBEX P1 Docs P2 Docs Learn Events
Display 24 Bit Number with BS2 — Parallax Forums

Display 24 Bit Number with BS2

ArchiverArchiver Posts: 46,084
edited 2003-07-31 21:23 in General Discussion
I have a 24 bit number that is stored as three bytes in an array.
The three bytes represent one 24 bit number that I would like to
display in the debug window or send out the COM port for display on a
PC. For example:
count(0)=0001 0011 (LSB)
count(1)=0100 0001
count(2)=0001 0001 (MSB)

This is how the 24 bit decimal number 1,130,771 is stored and I would
like to display it as a decimal number. Problem is I don't know how
to go about showing it.

Any pointers on how to display numbers stored as bytes as the
combined number they represent ?

Thank You

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-07-31 21:23
    Maybe the information at this URL can help:
    http://www.emesystems.com/BS2math6.htm#showdubdec

    -- Tracy


    >I have a 24 bit number that is stored as three bytes in an array.
    >The three bytes represent one 24 bit number that I would like to
    >display in the debug window or send out the COM port for display on a
    >PC. For example:
    >count(0)=0001 0011 (LSB)
    >count(1)=0100 0001
    >count(2)=0001 0001 (MSB)
    >
    >This is how the 24 bit decimal number 1,130,771 is stored and I would
    >like to display it as a decimal number. Problem is I don't know how
    >to go about showing it.
    >
    >Any pointers on how to display numbers stored as bytes as the
    >combined number they represent ?
    >
    >Thank You
Sign In or Register to comment.