1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-09 08:16:58 +02:00

Adds bitwise operators (AND, OR, XOR)

This commit is contained in:
Jake Faris
2015-10-30 10:22:23 -04:00
parent f0a4c88acf
commit 33337d045d

View File

@@ -41,7 +41,11 @@ You shouldn't either
35 / 5 #=> 7
2**5 #=> 32
5 % 3 #=> 2
5 ^ 6 #=> 3
# Bitwise operators
3 & 5 #=> 1
3 | 5 #=> 7
3 ^ 5 #=> 6
# Arithmetic is just syntactic sugar
# for calling a method on an object