There are three fundamental laws of logic. Suppose P is any indicative sentence, say, "It is raining."
The law of identity: P is P.
The law of noncontradiction: P is not non-P.
The law of the excluded middle: Either P or non-P
The law of identity says that if a statement such as "It is raining" is true, then the statement is true. More generally, it says that the statement P is the same thing as itself and is different from everything else. Applied to all reality, the law of identity says that everything is itself and not something else.
The law of noncontradiction says that a statement such as "It is raining" cannot be both true and false in the same sense. Of course it could be raining in Missouri and not raining in Arizona, but the principle says that it cannot be raining and not raining at the same time in the, same place.
The law of the excluded middle says: that a statement such as "It is raining" is either true or false. There is no other alternative.
These fundamental laws are true principles governing reality and thought and are assumed by Scripture. Some claim they are arbitrary Western constructions, but this is false. The basic laws of logic govern all reality and thought and are known to be true for at least two reasons: (1) They are intuitively obvious and self-evident. Once one understands a basic law of logic (see below), one can see that it is true. (2) Those who deny them use these principles in their denial, demonstrating that those laws are unavoidable and that it is self-refuting to deny them.
The basic laws of logic are neither arbitrary inventions of God nor principles that exist completely outside God's being. Obviously, the laws of logic are not like the laws of nature. God may violate the latter (say, suspend gravity), but He cannot violate the former. Those laws are rooted in God's own nature. Indeed, some scholars think the passage "In the beginning was the Word [logos]" (Jn 1:1) is accurately translated, "In the beginning was Logic (a divine, rational mind)." For example, even God cannot exist and not exist at the same time, and even God cannot validly believe that red is a color and red is not a color. When people say that God need not behave "logically," they are using the term in a loose sense to mean "the sensible thing from my point of view." Often God does not act in ways that people understand or judge to be what they would do in the circumstances. But God never behaves illogically in the proper sense. He does not violate in His being or thought the fundamental laws of logic.
Extracted from the Apologetics Study Bible.