Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Converting numbers to binary form.

From: gscottjones:mchsi at: 9-Sep-2002 10:57

From: "alan parman"
> Is there an easy way to represent numbers in their binary form? > > A work-around for 0 thru 255 is ... > > to-binary to-char number > > ... but what can one do for higher numbers?
Hi, Alan, Do you mean like the hex representation of the binary form? Perhaps "to-hex" will help up to a point.
>> to-binary to-char 255
== #{FF}
>> to-hex 255
== #000000FF
>> to-hex 256
== #00000100 --Scott Jones