The very first compiler was a hardware compiler that compiled punch cards. Once there were batch processing systems (that still compiled punch cards), FORTRAN was the only guy on the scene and that was written originally with assembly and ran off a reel-to-reel tape. Just as was previously stated, the beginning was 1s and 0s (early machines required operators to enter their program by flipping a series of switches up/down to represent 1/0 then hit a "process" button to order the machine to execute the instruction present on the switches). Programming started with binary code. Assemblers were written with binary code. FORTRAN was written in assembly at first then later it could be written in FORTRAN. The first C compiler, for a later example, was first written with assembly then later iterations were written in C itself.

I wondered exactly the same thing a few years back and was sort of perplexed at the time, but it is really a simple concept when you think about it.