Your understanding is correct.
In Middle and early Modern English, there were the words "yea" and "nay".
Yea = Your statement is correct
Nay = Your statement is incorrect
These were used in the way described by the OED:
A. adv. 1.a. Expressing an affirmative reply to a question (or implied question) which doesn't involve a negative: yes.
In older usage yea was considered the proper affirmative reply when the question was framed in the positive, whereas yes was usually
considered to be the proper affirmative reply to a question framed in the negative (see yes adv. 1a); a similar distinction was made between nay and no. This distinction became obsolete soon after 1600, and since then yes has been the ordinary affirmative reply to any question positive or negative, and yea has become archaic.
2006 J. Winterson Tanglewreck (2007) 150 Micah turned to
Balthazar. ‘Do you hear it, brother?’ ‘Yea.’
Had the question been ‘Don't you hear it, brother?’ then the answer would have been ‘Yes.’ - and he did hear it.
but to add confusion this guidance was not always followed:
c1384 Bible (Wycliffite, E.V.) (Douce 369(2)) (1850) Matt. xvii. 23 Thei..seiden to hym, Ȝoure maister payeth nat tribute? And he seith, Ȝhe.
[They...said to him. Your master does not pay tribute? And he said, Yea] i.e. My master does not pay tribute.
(In the later version, "yea" was changed to "this", i.e. "what had just been said.")
1999 J. Garnett Baron xxix. 276 ‘Will that not be enough to
rebuild Huntington?’ ‘Yea, but agreement has been delayed.’ Yea = that will not be enough.
Nay a. = no adv.2 1a; used to express negation, dissent, denial, or refusal, in answer to a statement, question, command, etc.**
In older usage nay was usually considered to be the proper negative reply to a question framed in the affirmative (yea would be the correct expression of a positive reply to the same). If the question was framed in the negative, then the proper negative reply would be no (with yes for a positive answer). This usage preserves the sense of nay as stemming from ne ay ‘not yes’. The distinction is explained by Thomas More:
1532 T. More Confut. Tyndales Answere iii. p. clxxxi No answereth the questyon framede by the affyrmatyue..yf a man sholde aske..is an heretyke mete to translate holy scrypture into englyshe..he muste answere nay and not no. But and yf the questyon be asked..Is not an heretyque mete to translate holy scripture into englysh. To this questyon..he muste answere no & not nay.
[No answers the question framed in the affirmative. If a man asks "Is a heretic suitable to translate Holy Scripture into English... He must answer "Nay" and not "No". But if the question is asked "Isn't a heretic suitable to translate Holy Scripture into English... He must answer "No" and not "Nay".]