A Look Into the Logic of Computer Science
Diving into discrete mathematics
Contrary to popular belief, computer science is not all about raw code. In my first year of computer science, I was surprised to see that my university required many “non-CS courses,” including calculus, linear algebra, and most interestingly, a class on logic and discrete mathematics. I had always known that computer science and mathematics were deeply intertwined, which is partly why I decided to do a joint major in both. However, this class gave me the underlying foundation to think deeply about the logic behind certain computer science principles, and I hope to give a brief introduction to some of the more fundamental topics in this article.
Truth Tables
Let’s begin with going over truth tables and propositions. In discrete mathematics, a proposition is simply a statement that has a truth value, and that truth value is either true or false. For example, the statement “two plus two equals 4” is a proposition because it has a truth value. In this case, its truth value happens to be true. However, note that the statement “two plus two equals five” is still a proposition because it retains the property of having a truth value; only in this case, the truth value is false. Common examples of statements that are not a propositions include questions. For example…