Conversion between bit and integer 
Author Message
 Conversion between bit and integer

Designing signal processing hardware, I frequently have occasion to convert
from integer to std_logic (or bit, or MVL?, or whatever) and back.  The only
way I know to do this is using modulo and 2**N.  This is, at the least,
frustrating since the integer representation is probably in two's complement
already.

Does anyone know of a better way to do this?  Is it a common enough problem
that it should be considered as a built-in to a simulator?

Any inputs are welcome.

--
-------------------------------------------------------------------------------
|  "Johnson"       | Opinions expressed herein are not those of my employer,  |

-------------------------------------------------------------------------------



Sat, 25 Dec 1993 00:21:53 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. conversion between bit and integer in verilog

2. Conversion of 32 bit unsigned integer

3. integer to 32-bit float conversion

4. integer square root ----(bit by bit algorithm cont)

5. first bit set in a 64 bit integer...

6. REQUEST: 64-bit integer math on 32-bit processor

7. top 32 bits of 64-bit product of two 32-bit integers

8. 16 bit tiff to 12 bit conversion

9. 16 bit to 32 bit Assembly conversion

10. Conversion 16 bit to 32 bit?

11. hex value to integer conversion

12. VisualWords: Conversion from integer to sting.

 

 
Powered by phpBB® Forum Software