Talk About Network

Google





Electronic Equipment > VHDL > Re: binary to i...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 11 Topic 6098 of 6445
Post > Topic >>

Re: binary to integer conversion code

by Ashani Patel <ashani4001@[EMAIL PROTECTED] > Jun 24, 2008 at 10:56 PM

On Jun 24, 4:31 pm, Brian Drummond <brian_drumm...@[EMAIL PROTECTED]
>
wrote:
> On Tue, 24 Jun 2008 00:16:54 -0700 (PDT), Ashani Patel
>
>
>
> <ashani4...@[EMAIL PROTECTED]
> wrote:
> >On Jun 23, 10:55 am, Nicolas Matringe <nicolas.matri...@[EMAIL PROTECTED]
>
> >wrote:
> >> Ashani Patel a =E9crit :
>
> >> > On Jun 23, 12:10 pm, Mark McDougall <ma...@[EMAIL PROTECTED]
> wrote:
> >> >> Ashani Patel wrote:
> >> >>> it doesnt show correct integer. while when i try to run other
prog=
rams
> >> >>> they work fine.
> >> Start by posting your code
> >process(bit_data)
>
> >    variable int_value : integer range 0 to 15:=3D0;
> >begin
>
> >    for N in 0 to M-1 loop
> >            if(bit_data(N) =3D '1') then
> >                    int_value :=3D int_value + 2**N;
> >            end if;
> >    end loop;
>
> Notice that each time the process is triggered, it starts the conversion
> from the old value in "int_value", not from zero.
>
> - Brian

Hi Brian
thanks a lot.
it did work.

regards
ashani
 




 11 Posts in Topic:
binary to integer conversion code
Ashani Patel <ashani40  2008-06-22 22:31:53 
Re: binary to integer conversion code
Mark McDougall <markm@  2008-06-23 17:10:23 
Re: binary to integer conversion code
Ashani Patel <ashani40  2008-06-23 00:24:55 
Re: binary to integer conversion code
Nicolas Matringe <nico  2008-06-23 19:55:49 
Re: binary to integer conversion code
Ashani Patel <ashani40  2008-06-24 00:16:54 
Re: binary to integer conversion code
Brian Drummond <brian_  2008-06-24 12:31:14 
Re: binary to integer conversion code
Ashani Patel <ashani40  2008-06-24 22:56:17 
Re: binary to integer conversion code
Peter <peter.hermansso  2008-06-25 03:21:47 
Re: binary to integer conversion code
Peter <peter.hermansso  2008-06-25 05:08:46 
Re: binary to integer conversion code
Andy <jonesandy@[EMAIL  2008-06-25 06:23:40 
Re: binary to integer conversion code
Ashani Patel <ashani40  2008-06-25 23:18:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Thu Jan 8 5:08:53 PST 2009.