The narrative continues in John 13:23 - "Now there was leaning on Jesus' bosom one of His disciples, whom Jesus loved." Certainly Jesus loved all of His apostles, but there was one apostle in particular who is ambiguously referred to on several occasions as "the disciple whom He loved" (cf. John 19:26,27; 21:20-24). It seems reasonable that this is John's way of referring to himself in the gospel account he penned. The name "John" is used in the book, but only in reference to John the baptizer (e.g., 1:35,40). John the apostle is never mentioned by name.
"Simon Peter therefore motioned to him to ask who it was of whom He spoke" - Peter assumed that John, the confidant of Jesus, would be able to elicit the identity of the betrayer from Jesus. "Lord, who is it?" (John 13:25). It seems likely that this question (as well as Peter's communication with John) was whispered, especially since John leans back upon Jesus to ask it. John was willing to make this inquiry for he was evidently just as anxious as Peter was to learn of the betrayer's identity.
Jesus replied - "It is he to whom I shall give a piece of bread when I have dipped it." Although one cannot be certain, it seems likely that Jesus' words here were not audible to the entire group. "And having dipped the bread, He gave it to Judas Iscariot" - From this moment on, John (at the very least) should have known that Judas was the betrayer. The act of dipping the bread and giving it to another was a common courtesy in that day. Jesus' actions wouldn't have seemed out of the ordinary to anyone who hadn't heard His preceding statement.
"Now after the piece of bread, Satan entered him" - Even after realizing that Jesus knew of his treachery, Judas was not moved from his plan. In fact, this knowledge seemed to harden Judas and motivate him to give himself more fully to Satan's influence.
"What you do, do quickly" - Jesus is certainly not commanding Judas to betray Him, but He is, in view of Judas' total commitment to evil, wanting Judas to quit pretending to be a true disciple when he is nothing more than a traitor and a hypocrite. As far as Jesus was concerned, Judas was beyond reasoning with, and the sooner he left them and proceeded with his wicked plans, the better.
"But no one at the table knew for what reason He had said this to him" - As mentioned previously, John, at the very least, should have understood what Jesus was talking about. Evidently he believed that the betrayal would happen sometime in the distant future and not within a few hours.
This passage is abundantly clear that Jesus was well aware of the fact that Judas was intending to betray Him. However, He did not explicitly declare Judas' identity to the group. Had Jesus come right out and declared Judas to be a traitor, then the other apostles would have certainly prevented Judas from leaving and fulfilling the wicked act.
The apostles are unsure of what to make of Jesus' comment to Judas (cf. John 13:27). Some of them thought that Judas was supposed to go out and buy some things that they would need for the Feast of Unleavened Bread. Others thought that Judas was to "give something to the poor," perhaps to aid the needy in preparing for the Feast.
Judas leaves the upper room immediately to carry out his wicked plot. "And it was night" - Although this phrase describes the physical time of day, it also seems symbolic of Judas' spiritual condition after giving himself over to the darkness of the devil.