You can do it at the airport when you arrive, just before you collect your baggage at Istanbul. Any bank will do a better rate than most of the Hotels or small money exchange merchants. There are ATMs in every big city, and especially near banks. Most tourist sites and restaurants also accept card payments.
Trudy, who is very well travelled, is right in suggesting using the ATM´s as the best choice for obtaining cash.
I also suggest getting a second credit card, with a very low credit limit, as the card to use with suspicious merchants (and as a back-up for your main card). Or, just use cash for those occasions. Sometimes merchants accept cards, but have to make the transaction on someone else´s machine because they don´t have a card-reader of their own.
The Visa Card is very commonly accepted, and don´t forget to warn your card company where you are travelling. Also get their international phone contact number if you have problems.
Have a good trip, iyi yolculuklar