Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

floating point to binary in VHDL

Status
Not open for further replies.

alierossi

Newbie level 6
Joined
Dec 7, 2009
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
malaysia
Activity points
1,375
floating point to binary

hi..
how can i convert value 0.3 and -0.3 to binary to store the binary value in my rom?
can anyone give an idea.
should i do it like this.....
i try to convert it to 8 bit.
so the last bit is for the sign number. then i get the answer is 00010011 for value 0.3 and 10010011 for -0.3.
my answer is correct or not?
 

Re: floating point to binary

my answer is correct or not?
Can't be said, unless you specify a number range and a representation. You apparently selected -2..+2 and
sign/magnitude representation. 2s complement would be a rather common representation. The range however can be
choosen arbitrarily.
 

    alierossi

    Points: 2
    Helpful Answer Positive Rating
floating point to binary

i'm a newbie at vhdl, but i think i'd rather convert it to 4 bits with other signal as a flag.. but it depends on how i want to use it..

can i do that??
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top