To answer your second question first: yes. Your sentence meets my definition of a 'complex sentence', part of which (my definition that is) is that the sentence contains one or more subordinate clauses which are not themselves able to stand alone as sentences. This is a matter of definition of the grammatical term 'complex sentence'. But there are other grammars and other definitions which your sentence might not meet.
As for your first question, yes it is grammatical, but it is quite difficult to parse, I had to read it twice to get what it means. Having an aversion to sentences which start with digits I'd rewrite it completely, and I'd follow @Shamayeta in putting in a few commas to clarify the structure. Something like:
"The binary number 10011111 is written 237 in octal, 159 in decimal, and 9F in hexadecimal."