Friday, October 2, 2009

Week 4

9-28-09

I'm still working on having a more complete knowledge of functions in C. I'm particularly stumped by the function
int atoi(char s[])
{
int i, n;

n = 0;
for (i = 0; s[i] >= '0' && s[i] <= '9'; ++i)
n = 10 * n + (s[i] - '0');
return n;
}


9-29-09

Mr. Elkner is helping me better understand data types. I'm going to start to learn both binary and hexadecimal. I need to learn this to properly understand the previously mentioned atoi function. I was given Mr. Elkner's definition of a data type, "A data type is an interpretation of bit patterns." I'm still sorting through exactly what this means but what I've read so far in the Kernighan and Ritchie book is starting to make more sense.

9-30-09

I spent the whole period studying binary on http://www.math.grin.edu/~rebelsky/Courses/152/97F/Readings/student-binary. So far I know integer conversion and some basic arithmatic in binary though the part of the tutorial about multiplication and division is slightly unclear. I'm going to look through other sites to find a better, more detailed guide.

10-1-09

I've finished studying regular binary and am now working on hexadecimal. I'm using http://www.lyzrdstomp.com/binary/hex1.html as a tutorial I've just about learned everything I currently need on the subject for my purposes and am looking over the ANCII chart.

10-2-09

With my study of binary and hexadecimal done for the time being I spent a portion of the period discussing both the programming competition and java with Mr. Elkner. The idea seems to be a promising one as he described java as similar to C. We also discussed C++ and object oriented programming which I hope to explore further as my proficiency with C improves.

1 comment:

  1. One of the coolest things to think about with binary numbers is the way that multiplying by 2 is equivalent to shifting all the bits one bit to the left. Ask me to show you that on Monday.

    ReplyDelete