Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert an Integer to Binary
Rebol [
Title: "Integer to Binary"
Date: 24-Jan-2017
]
method-1: func [
int [integer!]
][
debase/base to-hex int 16
]
method-2: func [
int [integer!]
][
to binary! reduce [
255 and shift int 24
255 and shift int 16
255 and shift int 8
255 and int
]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.