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
Type: Posts; User: NoobieGecko
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
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...
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...
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,...
So....
'a' is 97 in decimal, in binary:
0110 0001
'A' is 65 in decimal, in binary:
0100 0001
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;
Oh, nevermind, I've found the answer. Now I'm just wondering how to cast it to an unsigned int pointer...
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! ...
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!!
if u fit that in the mantissa it would over flow right? the bits on the right will fall to the guard bits
sign or unsigned?
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...
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...
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.
oh nevermnd about the 000000...1 000, it is in normal form :O
but how is the implicit 1 ignored on the second question?
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...
Hmm,
According to this:
http://www.math.byu.edu/~schow/work/IEEEFloatingPoint.htm
the smallest possible denorm is represented as:
0 00000001 00000...
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...
thanks.
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...
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
...
so if i did c += -32;
should that work as well?
char upper(char c){
if( c>='a' && c<='z')
return c +='A' - 'a';
else return c;
}
What the heck does 'A' - 'a' do?
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...
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