Nicholas and Alexandra probably believed that an execution was very likely, but as stated before, the entire family put all their hope in being rescued. By personal accounts, I've read a number of times how people felt as if Nicholas knew his fate. Alexandra, after the abdication, may have strongly felt too that perhaps both she and her husband would be killed, but both of them hoped that no matter what would happen to them the children would be saved.
As for the children themselves, Olga Nikolaevna definitely had the best knowledge on what was happening in the outside world; Baroness Sophie Buxhoeveden said that ON knew and understood the state of the country and what was going on, probably better than that of her parents. I think Olga may have strongly felt that their lives might finish; I think she became even more religious during those days and noted prayers in her notebook, asking for the strength to deal with what was going on and for their "executioners" to be forgiven. But I think, just like all her family, she hoped that there would be a rescue.
Alexei Nikolaevich had not yet reached fourteen when he was killed, but it certainly seems as if he sensed fate as well.
I can't say much about Tatiana, Maria and Anastasia Nikolaevna. The two latter seemed to have brighter spirits than their eldest sister. I don't know if Tatiana Nikolaevna ever thought that death might tragically be in store for them, but I definitely believe imprisonment was rough on her, as she like Olga also became much thinner and Charles Gibbes, their English tutor, said that Tatiana seemed even more withdrawn and haughtier to him than before. But Tatiana was a very strong girl, as she took care of the household and her brother, her parents relied on her and I believe she was an inspiration to her family. Perhaps she too thought that they would be killed, but I think she would have wanted to have kept her family's spirits up and not make things and their surrounding worse.
Overall, I think they may have thought that they were going to be killed, in particular N+A, Olga Nikolaevna and Alexei Nikolaevich (and who knows maybe Tatiana?), but in spite of all that I believe they were thankful, happy and felt blessed that they were all together as one.
Then, 'last obdenista' two days before murders. All member were quiet, one of GDs cried. Fortuitousness?
Nena, I've also thought about how there was a noticeable change in the IF's character during the last couple of days - how they seemed much more quiet and sad and one of the girls openly burst into tears. I think this might have been because the IF had been under arrest for a while and that no one had come to rescue them yet, and that each day they had no idea what was going to happen. I can't find reason to believe that anybody who guarded them in the Ipatiev House may have said something to them which would have strongly indicated that they were going to be killed.
Somebody refresh my memory, when did that fake rescue letter (by a guard?) come to the IF and where? Was it just a harsh scheme to make the IF get their hopes up?