summaryrefslogtreecommitdiff
path: root/docs/Bit-and_bytes-tutorial.md
diff options
context:
space:
mode:
authorPondaveia <43385840+Pondaveia@users.noreply.github.com>2019-05-03 21:24:36 +0100
committerGitHub <noreply@github.com>2019-05-03 21:24:36 +0100
commit61c80fd408ac7b3e94f185d048aeb9ac4aa84146 (patch)
treec8354eb9ca93534fa9dba6e977675c134b5eb9ab /docs/Bit-and_bytes-tutorial.md
parent22a8415d0953261ad9e64148060fce2896695df7 (diff)
downloadwiki-61c80fd408ac7b3e94f185d048aeb9ac4aa84146.tar.gz
wiki-61c80fd408ac7b3e94f185d048aeb9ac4aa84146.tar.bz2
wiki-61c80fd408ac7b3e94f185d048aeb9ac4aa84146.zip
Updated bit and bytes
Created a table as cheat sheet
Diffstat (limited to 'docs/Bit-and_bytes-tutorial.md')
-rw-r--r--docs/Bit-and_bytes-tutorial.md19
1 files changed, 8 insertions, 11 deletions
diff --git a/docs/Bit-and_bytes-tutorial.md b/docs/Bit-and_bytes-tutorial.md
index a40313c..a657019 100644
--- a/docs/Bit-and_bytes-tutorial.md
+++ b/docs/Bit-and_bytes-tutorial.md
@@ -261,17 +261,14 @@ x << 2 would move all bits by 2 so x would become
[Cheat sheet taken from this link](https://www.geeksforgeeks.org/bitwise-operators-in-c-cpp/)
-1. "&" (bitwise AND) Takes two numbers as operands and does AND on every bit of two numbers. The result of AND is 1 only if both bits are
-
-2. "|" (bitwise OR) Takes two numbers as operands and does OR on every bit of two numbers. The result of OR is 1 any of the two bits is
-
-3. "^" (bitwise XOR) Takes two numbers as operands and does XOR on every bit of two numbers. The result of XOR is 1 if the two bits are different.
-
-4. "<<" (left shift) Takes two numbers, left shifts the bits of the first operand, the second operand decides the number of places to shift.
-
-5. ">>" (right shift) Takes two numbers, right shifts the bits of the first operand, the second operand decides the number of places to shift.
-
-6. "~" (bitwise NOT) Takes one number and inverts all bits of it
+Character | Operation | Description
+-- | -- | --
+& | AND | Takes two numbers as operands and does AND on every bit of two numbers. The result of AND is 1 only if both bits are
+\| | OR | Takes two numbers as operands and does OR on every bit of two numbers. The result of OR is 1 any of the two bits is
+^ | XOR | Takes two numbers as operands and does XOR on every bit of two numbers. The result of XOR is 1 if the two bits are different.
+\<\< | left shift | Takes two numbers, left shifts the bits of the first operand, the second operand decides the number of places to shift.
+\>\> | right shift | Takes two numbers, right shifts the bits of the first operand, the second operand decides the number of places to shift.
+~ | NOT | Takes one number and inverts all bits of it
# Credits