lllllllllllll
lllllllllllll

Reputation: 9110

How to do arithmetic and or operations in prolog?

In C, given two numbers like this:

1010
0101

I can do something like this:

0000 == 1010&&0101;
1111 == 1010||0101;

Then is it possible to use Prolog do the same thing..?

Thank you!

Upvotes: 3

Views: 185

Answers (1)

remudada
remudada

Reputation: 3791

In prolog, you can use the following operators for bitwise arithmatic

&& = /\ 
|| = \/

I hope this helps.

Upvotes: 5

Related Questions