bit.DecToBin(x) under b4a

schimanski

Well-Known Member
Licensed User
Longtime User
Hello together!

Is there something like this under b4A?

B4X:
bit.DecToBin(X)
bit.BinToDec(X)
Format(X,"d4")

Thanks for answer....
 

schimanski

Well-Known Member
Licensed User
Longtime User
Thanks, Erel!

Bit.ToBinaryString and ParseInt runs fine. But I'm looking also for a format- function like Format(X,"d4"). I want to fill a binärcode with additional zeros. For example:

'1101' to '00001101'

Is that possible?

rgds
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
Thanks, agraham!!

I tried it with this code:

B4X:
textbox4.Text=NumberFormat("1", 8 ,0)

Must the solution not be '00000001'???

I have '00,000,001'
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…