This works:

julia> a = 0b10101111
0xaf

julia> parse("0b"*bin(a))
0xaf

but maybe there are better ways.

On Fri, 2015-12-04 at 13:33, Martin Somers <[email protected]> wrote:
> Just wondering binary to hex
> a = 0b10101111
> bin(a) >>>>>  "10101111"
>
> this results in a string that can be accessed with [] notation
>
> is there an easy way to go backwards I want to change some of the bits and
> get a hex back
>
> M

Reply via email to