5V squae/sine to 12v square

I am working on a project right now and I need a way to convert a 5V square/sine(not sure which yet) to a 12V square. I think a 4558 can help me, but I don't know. How would you suggest I do this?

Run the 5V sine into a 12V powered comparator. Connect other leg of the comparator to a trim pot so you can set the level where the comparator trips.
See the LM358 circuit in the autopower select circuit of card like the Uno.

For a square wave, can create an inverted 12V output by driving 5V thru a 270 ohm resistor into the base of a NPN transistor with its collector pulled up to 12V with a 1K resistor and emitter tied to Gnd. The collector will the 0-12V square wave.

CrossRoads:
For a square wave, can create an inverted 12V output by driving 5V thru a 270 ohm resistor into the base of a NPN transistor with its collector pulled up to 12V with a 1K resistor and emitter tied to Gnd. The collector will the 0-12V square wave.

The only problem with it being inverted is that it is Manchester biphase and since it is state based, an inverted signal wouldn't work with the circuitry I am interfacing with.

Ok, so invert it twice then, or use an 8-pin opamp powered from 12V.

CrossRoads:
Run the 5V sine into a 12V powered comparator. Connect other leg of the comparator to a trim pot so you can set the level where the comparator trips.
See the LM358 circuit in the autopower select circuit of card like the Uno.

With the LM358, do I simply feed my ardunio GND to leg 2, 5v signal to leg three, 12V GND to 4, and +12V to 8 and then I get a 12v square wave out leg 1?