Good and easy mathematical logic book for computer science

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
Byeonggon Lee
Messages
14
Reaction score
2
Hello I recently noticed that mathematical logic is related to computer science.
I haven't studied math in university yet I'm not good at math and Since I'm not a native English speaker some English is hard to me.
Is there any good and easy book which describes mathematical logic used in computer science?
 
Physics news on Phys.org
Very little mathematical logic is used in computer science, in my experience. The logical operators that are most common are these:
Not - logical negation of a boolean expression
And - expr1 "and" expr2 is true if and only if both subexpressions are true
Or - expr1 "or" expr2 is true if expr1 is true, or if expr2 is true, or if both are true
Xor (AKA exclusive or) - expr1 "xor" expr2 is true if the two subexpressions have opposite truth values

Most programming languages have these concepts, but they use different symbols. For example, C and the languages based on C use ~ for NOT, && for logical AND, || for logical OR, and ^ for exclusive OR. Newer versions of Fortran use .NOT., .AND., .OR. I don't believe Fortran has an exclusive or operator, per se, but its .NEQV. operator works similarly.