• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Can someone make this VB program

Status
Not open for further replies.
Level 22
Joined
Feb 3, 2009
Messages
3,292
Can some one make me a program that will convert any number into the 0 and 1 language. I will demonstrate how it works :

Let's say i pick number 25:

12 x 2 + 1
6 x 2 + 0
3 x 2 + 0
1 x 2 + 1
0 x 2 + 1

so we have 25 = 11001
(the numbers we get must be writen from down to up) so 10011 is wrong.

Then for reverse from 11001 to 25 we do:

1 x 2^0 = 1
0 x 2^1 = 0
0 x 2^2 = 0
1 x 2^3 = 8
1 x 2^4 = 16

1 + 0 + 0 + 8 + 16 = 25

And we are done.

So if anyone can make this, i tryed but failed.:sad:
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
Can some one make me a program that will convert any number into the 0 and 1 language. I will demonstrate how it works :

Let's say i pick number 25:

12 x 2 + 1
6 x 2 + 0
3 x 2 + 0
1 x 2 + 1
0 x 2 + 1

so we have 25 = 11001
(the numbers we get must be writen from down to up) so 10011 is wrong.

Then for reverse from 11001 to 25 we do:

1 x 2^0 = 1
0 x 2^1 = 0
0 x 2^2 = 0
1 x 2^3 = 8
1 x 2^4 = 16

1 + 0 + 0 + 8 + 16 = 25

And we are done.

So if anyone can make this, i tryed but failed.:sad:


See binary code works like this:


25 = 11001

let's first of all reverse this number -> 10011 (it's easier)

The first number (1) is "1"
The second number (0) is "2"
The third number (0) is "4"
The forth number (1) is "8"
The fith number (1) is "16"

So you have 1x1 + 0x2 + 0x4 + 1x8 + 1x16 = 25

In the end the whole thing is read from the other direction. "1" is the number on the right.
 
Status
Not open for further replies.
Top