One hears people in the movies say "Affirmative" when they are speaking on a telephone or on a walkie-talkie. Does this word mean "yes"? Can it be used instead of "yes"?
Since you're asking about registers, it's worth noting that affirmative as a response is decidedly formal. However, yes is so common that it's really acceptable in all registers, and you will likely raise some eyebrows if you respond with affirmative. The only times when affirmative is called for are during military or radio communication. This is because it's more difficult to mishear affirmative, and if you're also relaying a message for someone, it's unlikely to be mistaken as part of the message's content, due to its relative rarity.