How do you answer "Yes" to a yes-or-no question in the Torah? Most people say "כן", but that means something like "so" or "thus": ויהי כן, or לֹא־יֵעָשֶֹה כֵן בִּמְקוֹמֵנוּ. Another answer is "הן", but that means more like "Agreed": ויואמר לבן הן לו יהי כדבריך - "Lavan said, Fine! - let it be like your words."
The actual way it's done is shown here in the gemara here from the way the Urim v'Tumim answer questions:
Here are some examples from Chumash:
(Parshas Toldos) וַיֹּאמֶר אַתָּה זֶה בְּנִי עֵשָֹו וַיֹּאמֶר אָנִי
(Parshas Chayei Sarah): הַגִּידִי נָא לִי הֲיֵשׁ בֵּית־אָבִיךְ מָקוֹם לָנוּ לָלִין. ... וַתֹּאמֶר אֵלָיו גַּם־תֶּבֶן גַּם־מִסְפּוֹא רַב עִמָּנוּ גַּם־מָקוֹם לָלוּן
(Parshas Vayeitzei): וַיֹּאמֶר לָהֶם הַיְדַעְתֶּם אֶת־לָבָן בֶּן־נָחוֹר וַיֹּאמְרוּ יָדָעְנוּ. וַיֹּאמֶר לָהֶם הֲשָׁלוֹם לוֹ וַיֹּאמְרוּ שָׁלוֹם
The actual way it's done is shown here in the gemara here from the way the Urim v'Tumim answer questions:
הירד שאול וגו' ויאמר ה' ירד
היסגרו בעלי קעילה אתי ואת אנשי ביד שאול ויאמר ה' יסגירו
וישאל דוד בה' לאמר ארדף אחרי הגדוד הזה האשיגנו ויאמר לו רדף כי השג תשיג והצל תציל
In other words, the way to say "Yes" is to repeat the word in the questioning sentence that held the question.היסגרו בעלי קעילה אתי ואת אנשי ביד שאול ויאמר ה' יסגירו
וישאל דוד בה' לאמר ארדף אחרי הגדוד הזה האשיגנו ויאמר לו רדף כי השג תשיג והצל תציל
Here are some examples from Chumash:
(Parshas Toldos) וַיֹּאמֶר אַתָּה זֶה בְּנִי עֵשָֹו וַיֹּאמֶר אָנִי
(Parshas Chayei Sarah): הַגִּידִי נָא לִי הֲיֵשׁ בֵּית־אָבִיךְ מָקוֹם לָנוּ לָלִין. ... וַתֹּאמֶר אֵלָיו גַּם־תֶּבֶן גַּם־מִסְפּוֹא רַב עִמָּנוּ גַּם־מָקוֹם לָלוּן
(Parshas Vayeitzei): וַיֹּאמֶר לָהֶם הַיְדַעְתֶּם אֶת־לָבָן בֶּן־נָחוֹר וַיֹּאמְרוּ יָדָעְנוּ. וַיֹּאמֶר לָהֶם הֲשָׁלוֹם לוֹ וַיֹּאמְרוּ שָׁלוֹם