I need to convert 5V square wave to 24V at 1MHz. I tried using common emitter ckt with 2N2222 on the breadboard , the max I could go was about 100KHz. Rb is 1K. Rc is 500Ω Playing with the collector resistor improved the speed a little. Where can I find the math for a design like this? Also, why does the speed depend on collector current.