Forum Discussion
Altera_Forum
Honored Contributor
15 years agoproblem with fixed point number
sir/madam i want to multiply 2 floating point number(say,1.5 and 2.7).but i can't understand how to convert them in integer (say 8 bit integer). i don't want to use floating multiplier bcoz it...
Altera_Forum
Honored Contributor
15 years agoIf you're using VHDL - check out the fixed point package. then its as easy as:
my_value <= to_ufixed(1.5, 3, -4); --8 bits - 4 bits integer 4 bits fraction.