The main goal of this paper is to establish a nonmonotonic epistemic logic Ej3 with two modalities -provability and belief capable of expressing and comparing a variety of known semantics for extended logic programs, and clarify thxeir meaning. In particular we present here, for the first time, embeddings into epistemic logic of logic programs extended with a second kind of negation under the well-founded semantics, and contrast them to the recent embeddings into autoepistemic logics of such programs under stable models based semantics. Because of the newly established relationship between our epistemic logic Ej3 and extended program semantics, the former benefits from the procedures and implementations of the latter, and can be applied to at least the same class of AI problems that the latter can. Moreover, one issue of epistemic logic introduced here, belief revision, can profit from adapting techniques employed by the latter for contradiction removal. Furthermore, the language of the epistemic logic presented here being more general than that of extended programs, it offers a basic tool for further generalizations of the latter, for instance regarding disjunction and modal operators.