The passive voice is used when we want to emphasize the action (the verb) and the object of a sentence rather than subject. This means that the subject is either less important than the action itself or that we don’t know who or what the subject is.
The passive voice is not a tense in English. Each tense has its own passive voice which is created by using a form of the auxiliary verb to be + V3 (past participle).
Notice that the above sentences are in future perfect tense.Future perfect has two different forms:"will have done" and "be going to have done".
The Future Perfect expresses the idea that something will occur before another action in the future. It can also show that something will happen before a specific time in the future.The following examples of Future Perfect tense will help you understand and use this tense properly and naturally.
Here are some Future Perfect Tense Example Sentences:
"Jack will have finished his homework by the time his mother gets home."
"The snow will have stopped by April."
"By next month, you will have received your promotion."
Now the "passive voice" in the "future perfect" tense is:
And now let the examples begin!
The car will have been loaded by the time he gets home.(passive)
They will have loaded the car by the time he gets home.(Active)
The crates will have been loaded by then.(passive)
They will have loaded the crates by then.(Active)
They will have completed the project before the deadline. (Active)
The project will have been completed before the deadline. (Passive)
Now back to your question:
The first sentence is in Active Voice.(will+have+taken)
The second one is in Passive Voice.(will+have+been+taken)
If you want to include the subject in a passive sentence ,it is called "agent".Agent is used to indicate exactly who performed the action. So according to this you can say:
"The exam will have been taken by me by next month."(me=agent)