Difference in logic notations for maths and computer science

$\begingroup$

I am reading: How to prove it, A structured approach by Daniel J.Vellemanand despite it being a book based on both maths and computer science all logic statements seems to be in the "maths logic" notation like so: $$\lor, \land, \lnot$$ However in all my computer science classes we used "computing logic" notation like so: $$+,\cdot,\overline{A}$$ There is no explanation of when, and which, of these notations are to be used in different scenarios in the book. I personally prefer the "maths logic notation" and my best guess is that the reason it seems to be used more is that it is less ambiguous as it uses its own symbols. If this is the case is there any real reason for the "computing logic notation" to be used, or is it just used due to tradition?

Also as a side note my book stated that in maths $or$ is considered to be iclusive is there therefore a separate sign for exclusive $or$ much like $\oplus$ in computing notation?

$\endgroup$ 10

1 Answer

$\begingroup$

If you observe, the computer science notation is similar to regular algebra notation: addition signs and multiplication signs. It becomes convenient to use when 'or' doesn't really represent a logical 'or' but a bitwise 'or', sometimes just called 'addition' (without carries):

 10010101
+ 00100101
= 10110101

'Multiplication' a.k.a. 'and' works similarly. The main difference is that the computer science notation is used more often in the context of performing this special type of arithmetic, or dealing with Boolean algebra expressions like $AB + \bar{A}C$, because it is easier to think of them that way. (E.g. There are digital circuits called 'adders'.)

The mathematical notation of $\land$, $\lor$, $\lnot$ is used exclusively for logical statements like $P(x) \land \lnot(Q(x) \lor R(x))$. I have almost never seen something like $10010101 \lor 00100101$ and it would be unintuitive to write it that way.

This duality is quite interesting when you notice that the two notations are actually talking about the same thing!

$\endgroup$ 5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like