That works, but I'm concerned with the part of the original post that says 
" I want to change some of the bits and get a hex back"

I'm hoping that the OP's plan to "change bits" is not realized by changing 
the string representation, but rather changing the bit representation 
(using << and >> and/or bitwise operators). 

S.

On Friday, December 4, 2015 at 4:49:09 AM UTC-8, Mauro wrote:
>
> 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 <somers...@gmail.com 
> <javascript:>> 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