Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

converting a binary number into an integer???

Status
Not open for further replies.

spiker2002uk

Technical User
Dec 9, 2002
1
GB
I have some code in the form of a function to convert a binary number to an integer but I'm not sure how to use it in the rest of my code.

I want to input a binary number, convert it to an integer and use it. I am not sure where to fit the function in and relate it to the rest of the code.

Could someone please help me please?

Thankyou.
 
for i in 0 to 7 loop
if(InD(i)='1') then
Number:=Number+value;
end if;
value:=value*2;
end loop;


Number is integer and contains the value of the vector InD
InD is the input vector
value is an integer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top