Search:

Type: Posts; User: gothic_type; Keyword(s):

Search: Search took 0.02 seconds.

  1. Replies
    19
    Views
    26,764

    Fair enough, if you are using loads of for loops...

    Fair enough, if you are using loads of for loops you may need a few counters, but I would worry when you've got so many embedded for loops. It might be ok, but hrrm.

    And btw -- ...
  2. Replies
    19
    Views
    26,764

    Hey man, I told you about the meaningful variable...

    Hey man, I told you about the meaningful variable names thing. I refuse to help you with your code until you change the variables from a,b,c, etc. into something more englishlike that I can track...
  3. Replies
    19
    Views
    26,764

    Just for your interest, here's a program I wrote...

    Just for your interest, here's a program I wrote last night to convert decimal to binary. It lets you specify the number of bits that you want to use (that's kinda pointless really, but I felt like...
  4. Replies
    19
    Views
    26,764

    The first thing that I notice is your while loop...

    The first thing that I notice is your while loop condition. While I couldn't really say that it's not correct, it is possible that it could cause your program to go through more calculations than it...
  5. Replies
    19
    Views
    26,764

    No, I was attempting to illustrate why you would...

    No, I was attempting to illustrate why you would need the three parameters. Namely because for some cases it would be impossible to tell which of the three the original number was and for all cases...
  6. Replies
    19
    Views
    26,764

    lepricaun, you would need three vars because you...

    lepricaun, you would need three vars because you need to know what base the original number is in (or I suspect you do). The following example should illustrate it for you:

    What base is 10 in?
    ...
  7. Replies
    19
    Views
    26,764

    I assume you know of the switch statement? :)...

    I assume you know of the switch statement? :) Basically simple hex (as in 0 - 255 I believe) is made up of 2 characters. The first is multiplied by 16, then the second is added. So if you only have...
  8. Replies
    19
    Views
    26,764

    The modulus operator is also handy for other...

    The modulus operator is also handy for other conversions such as hex. Because hex is base 16 (I hope I'm right on that :)) you just modulus and divide by 16 instead of by 2. It's a slightly different...
  9. Replies
    19
    Views
    26,764

    If you mod a number by two until you cannot do so...

    If you mod a number by two until you cannot do so anymore you will get the binary equivalent of it.

    Modding (or modulusing) a number is where you get the remainder given when you divide it by...
Results 1 to 9 of 9