how does the binary system work?

Here is a short tutorial that should help:

http://www.cs.grinnell.edu/~rebelsky/Courses/CS152/97F/Readings/student-binary.html