V
Vazquez
Guest
Hi @all,
I have a vector with 32 bit [31 downto 0].
After some calculations the vector could look like that:
a)0000 0000 0000 0000 0000 0000 1000 0000
or
b)0000 0000 1000 0000 0000 0100 0000 0000
How can I transform the position(s) of the one(s) in the
vector to a corresponding binary value?
for example in a) '1' at position 7 of the vector =>
binary value would be: b111
Is there some simple and fast possibility to make this transformation?
Thanks a lot.
Best regards
I have a vector with 32 bit [31 downto 0].
After some calculations the vector could look like that:
a)0000 0000 0000 0000 0000 0000 1000 0000
or
b)0000 0000 1000 0000 0000 0100 0000 0000
How can I transform the position(s) of the one(s) in the
vector to a corresponding binary value?
for example in a) '1' at position 7 of the vector =>
binary value would be: b111
Is there some simple and fast possibility to make this transformation?
Thanks a lot.
Best regards