• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] can anyone verify if you can use base 2 in World Editor?

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Very few languages support base 2. You can convert to hex from base 2 in like 3 seconds so this is no major problem.

Infact, only recently did java receive base2 support. I guess this is because the average computer scientist is becomming less and less good at programming that they can not reliable use hex anymore (despite taking many courses involving it).

Code:
 0 - 0 - 0000
 1 - 1 - 0001
 2 - 2 - 0010
 3 - 3 - 0011
 4 - 4 - 0100
 5 - 5 - 0101
 6 - 6 - 0110
 7 - 7 - 0111
 8 - 8 - 1000
 9 - 9 - 1001
10 - A - 1010
11 - B - 1011
12 - C - 1100
13 - D - 1101
14 - E - 1110
15 - F - 1111

Thus 0b111 should be 0x7

The only time that raw binary is vaguly useful is for setting specific flags (eg for a memory mapped micro controler).

Raw binary has tons of disadvantages (why it was never majorly used). If you have a 64 bit value (common nowdays), that is 64 binary digits. Now imagine you have a 64 bit binary number.
0b1010101010101010101010101010101010101010101010101010101010101010
You could easilly get confued over digit placement compared with hex.
0xAAAAAAAAAAAAAAAA

Hex is a reduction in characters to count of 1/4. Additionally, the characters are much more distinct (base 16 not base 2) so your brain is less likly to misscount or get lost.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Oh no, I was just curious to see if WE supported binary. I learned that google supported it.
convert 7 to binary
google would give like 7 = 0b111
Thats because some languages do support binary like that.
Python or Java 1.7 (released recently) for example do.

Most C/C++ compilers do not however nor did older versions of Java (1.6 or earlier).

On the contary, hex support seems prety universal even among scripting languages (its one of the few things WC3 can do lol).
 
Status
Not open for further replies.
Top