Binary code

Blitz3D Forums/Blitz3D Beginners Area/Binary code

Jerome Squalor(Posted 2007) [#1]
Can i use binary code in blitz in any way?


Fuller(Posted 2007) [#2]
I've actually been wondering this too,

Besides the Bin functions, i don't know.


Matty(Posted 2007) [#3]
What kind of binary code? Binary is just a different number representation.


Jerome Squalor(Posted 2007) [#4]
oh. I don't really know...I just found a website that converts text into Binary code, is there anything i can do with that?


Matty(Posted 2007) [#5]
There are plenty of things you can do with that, what did you want to do with it?


Ross C(Posted 2007) [#6]
You could for instance use a 32 bit int, (just a regular integer) and use each of the bits there as a flag. Save yourself using a whole integer just for ON/OFF status. You therefore use 1/32 of the memory. A use or understanding of binary would help you use this i guess.


Who was John Galt?(Posted 2007) [#7]
Blitz has all the commands you need to create and modify values at the bit level.


jfk EO-11110(Posted 2007) [#8]
;Binary:

a=%10011010110
print a
print bin$(a)



;Hexadecimal:

b=$2E7A
print b
print hex$(b)