Code center > Darwinbots Program Source Code
Binary
Zelos:
nums, you talk about in enzymes about using hexa for enzyme codes. the question is how big is one of those in bits? is it 4 bits? and is "1" 0001 in bits? and "2" 0010? and "F" 1111?
and is there a way to know what bit pattern a you represent?
Numsgil:
A hex code is 4 bits (2^4 = 16, so each digit in Hex has 16 possible values). Thus each byte is represented by 2 hex codes.
You can convert numbers between hex, binary, and hexidecimal really easy, but I forget how at the moment. I always just use the calculator that comes with windows. In "scientific" mode it can operate as a converter between decimal, hex, and binary.
Zelos:
Nice, but what about letters? doesnt each letter represent a byte? so how do I convert a binary code/ hexa code into a letter as we know them?
Numsgil:
In hex:
A = 10 in decimal
B = 11 "
C = 12
D = 13
E = 14
F = 15
10 = 16
Zelos:
I know that, I got hexa on my calculator and my first program.
in the vb code of db how were you acctualy planning doing this kind of stuff? I mean making a code of letters/hexa into stuff the program can read?
Navigation
[0] Message Index
[#] Next page
Go to full version