Search:

Type: Posts; User: NoobieGecko

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. erm..nvrmnd... i did this .. int r = 0;...

    erm..nvrmnd...

    i did this ..

    int r = 0;
    for i to maxrow
    for j to maxcol
    array( i,j )= r++

    now i got 2 for loops instead of 3 nevermind!! <3 and they all have unique keys
  2. How do you make a 2D array that maps efficiently?

    Hi guys, I'm making a 2D int array (int array[400][400]) inside a class and i'm trying to map each [x][y] to a separate key, which i use to insert some object into a map. My question is, what is the...
  3. Replies
    8
    Views
    3,770

    i've taken C and Java, but what i know is still...

    i've taken C and Java, but what i know is still very little, chances are i'll probably mess up making an array of structs or end up having a memory leak like my last project :( i'm thinking structs...
  4. Replies
    8
    Views
    3,770

    Advantage of C in computer graphics?

    Hi everyone! I was just wondering what would be an advantage of C when used for graphics code? I'm about to take a computer graphics class but it seems that it would be wiser to use java over C,...
  5. Replies
    2
    Views
    1,450

    So.... 'a' is 97 in decimal, in binary: ...

    So....

    'a' is 97 in decimal, in binary:

    0110 0001

    'A' is 65 in decimal, in binary:

    0100 0001
  6. Replies
    2
    Views
    1,450

    Trick with strings help/questions

    Question 1:
    Hey guys, I got a question about strings. Suppose *p points to a character in a string, say character 'A'. I have a pointer *r and I wish to point *r such that




    *r = *p | 0x20;
  7. Replies
    3
    Views
    1,031

    Oh, nevermind, I've found the answer. Now I'm...

    Oh, nevermind, I've found the answer. Now I'm just wondering how to cast it to an unsigned int pointer...
  8. Replies
    3
    Views
    1,031

    Hoy! What is void*?

    Hi guys! I'm looking at this block of code right now. Can someone quickly explain to me what void* means? This is for my last C project this semester, and yes I'm starting REALLY early this time! ...
  9. Replies
    9
    Views
    1,151

    i'm slow, i can't do that in 15 mins tabs, plus i...

    i'm slow, i can't do that in 15 mins tabs, plus i got a midterm in 13 minutes =(
    how about i do that after the midterm? i'll figure it out, thanks alot!!
  10. Replies
    9
    Views
    1,151

    if u fit that in the mantissa it would over flow...

    if u fit that in the mantissa it would over flow right? the bits on the right will fall to the guard bits
  11. Replies
    9
    Views
    1,151

    sign or unsigned?

    sign or unsigned?
  12. Replies
    9
    Views
    1,151

    so if i represent the largest unsigned int which...

    so if i represent the largest unsigned int which is 2^32 we have in the exponent 2^159 which can still represent 2^32 right? 159-32 = 127 which is the bias. so where are we adding the extra 1? i...
  13. Replies
    9
    Views
    1,151

    Another floating point question

    The question asks, what is the largest unsigned int that can be represented between two floats? and what does it round to?

    The answer is that it falls between 2^(32) and 2^(32)-2^(8) and half way...
  14. Replies
    7
    Views
    1,633

    thanks, that clears things up now, so every time...

    thanks, that clears things up now, so every time i have to convert to denormalized i always have to ignore the implicit 1 and shift the decimal point to the right by 1 -- that should do it right.
  15. Replies
    7
    Views
    1,633

    oh nevermnd about the 000000...1 000, it is in...

    oh nevermnd about the 000000...1 000, it is in normal form :O
    but how is the implicit 1 ignored on the second question?
  16. Replies
    7
    Views
    1,633

    i know how to add the powers, but of course...

    i know how to add the powers, but of course 2^-149 = 2^(-126)*2^(-23)
    let me fix the question,

    the answer is 2^-149, but how does the above representation lead to that 2^-149??

    or in binary...
  17. Replies
    7
    Views
    1,633

    Hmm, According to this: ...

    Hmm,

    According to this:

    http://www.math.byu.edu/~schow/work/IEEEFloatingPoint.htm

    the smallest possible denorm is represented as:

    0 00000001 00000...
  18. Replies
    7
    Views
    1,633

    floating point help!

    I don't know how to calculate the smallest non-zero denorm.
    okay maybe i know a little.

    so the smallest denorm is this right?
    s exp fraction
    0 [000 0000 0] 000...
  19. Replies
    9
    Views
    3,431

    thanks.

    thanks.
  20. Replies
    9
    Views
    3,431

    so to convert it to four unsigned bytes, i should...

    so to convert it to four unsigned bytes, i should subtract 11111111 from 811f00fe ? repeatedly? or take away the " " ?? because if i take a way the spaces i dont think that would be accurate, would...
  21. Replies
    9
    Views
    3,431

    Hex to four unsigned bytes

    I don't know what an unsigned byte looks like. I'm assuming since its a byte it is a quarter of a word? A short would be two bytes correct?

    So what is this in four unsigned bytes

    0x811F00FE
    ...
  22. Replies
    9
    Views
    1,181

    so if i did c += -32; should that work as...

    so if i did c += -32;

    should that work as well?
  23. Replies
    9
    Views
    1,181

    What is this? (stuff in toupper())

    char upper(char c){

    if( c>='a' && c<='z')
    return c +='A' - 'a';
    else return c;
    }


    What the heck does 'A' - 'a' do?
  24. Replies
    4
    Views
    1,658

    oh i just wanted to know how sign extension...

    oh i just wanted to know how sign extension works, it's actually a mips instruction

    loadbyte

    lb $24,-2048($20)

    my guess is that "load byte" has to have a sign extended immediate

    so 1000...
  25. Replies
    4
    Views
    1,658

    Binary Conversion anyone?

    Okay So I have this

    100000 10100 11000 1000 0000 0000 0000

    This section of the binary is assumed to be sign extended

    1000 0000 0000 0000

    so it turns to this
Results 1 to 25 of 73
Page 1 of 3 1 2 3