RE: Binary conversion

new topic     » topic index » view thread      » older message » newer message

Jonas  Temple wrote:
> Okay, I asked this a while back and now I've got a slightly different 
> problem.
> 
> If I have a sequence of {0,0,0,2} that is supposed to represent a binary 
> 
> number, how do I convert that to an atom?
> 
> Jonas
> 
> 
hi Jonas 
i did not see the orginal posting.
but would a table be helpful?
since the smallest element in Euphoria is an atom then a table of 32 
entrys of the 32 different bit positions would be needed.

using 'or', 'and' or 'xor' should work

receiver = receiver or'd with table entry(input position)

this is my first thought on it. working nights makes one groggy.
later
rudy


lotterywars

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu