diff --git a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/and.py b/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/and.py deleted file mode 100644 index 58220dc..0000000 --- a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/and.py +++ /dev/null @@ -1,13 +0,0 @@ -READ_PERMISSION = 4 -WRITE_PERMISSION = 2 -EXECUTE_PERMISSION = 1 - -userPermissions = 6 - -if (userPermissions & READ_PERMISSION) == READ_PERMISSION: - print("Can Read") -else: - print("Cannot Read") - -print(userPermissions & READ_PERMISSION) -print(bin(userPermissions & READ_PERMISSION)) diff --git a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/left.py b/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/left.py deleted file mode 100644 index 99caaa6..0000000 --- a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/left.py +++ /dev/null @@ -1,9 +0,0 @@ -number = 5 - -print(number) -print(bin(number)) - -number = number << 2 - -print(number) -print(bin(number)) \ No newline at end of file diff --git a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/not.py b/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/not.py deleted file mode 100644 index a092fec..0000000 --- a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/not.py +++ /dev/null @@ -1,9 +0,0 @@ -number = 5 - -print(number) -print(bin(number)) - -number = ~number - -print(number) -print(bin(number)) \ No newline at end of file diff --git a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/or.py b/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/or.py deleted file mode 100644 index 8b33857..0000000 --- a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/or.py +++ /dev/null @@ -1,8 +0,0 @@ -READ_PERMISSION = 4 -WRITE_PERMISSION = 2 -EXECUTE_PERMISSION = 1 - -userPermissions = READ_PERMISSION | WRITE_PERMISSION - -print(userPermissions) -print(bin(userPermissions)) diff --git a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/or2.py b/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/or2.py deleted file mode 100644 index fc132fd..0000000 --- a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/or2.py +++ /dev/null @@ -1,10 +0,0 @@ -READ_PERMISSION = 4 -WRITE_PERMISSION = 2 -EXECUTE_PERMISSION = 1 - -userPermissions = READ_PERMISSION | WRITE_PERMISSION - -userPermissions |= EXECUTE_PERMISSION - -print(userPermissions) -print(bin(userPermissions)) \ No newline at end of file diff --git a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/right.py b/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/right.py deleted file mode 100644 index b6dd000..0000000 --- a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/right.py +++ /dev/null @@ -1,14 +0,0 @@ -number = 5 - -print(number) -print(bin(number)) - -number = number << 2 - -print(number) -print(bin(number)) - -number = number >> 2 - -print(number) -print(bin(number)) \ No newline at end of file diff --git a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/xor.py b/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/xor.py deleted file mode 100644 index ef4002d..0000000 --- a/2022-10-21-Bitwise-Operators-and-WHY-we-use-them/xor.py +++ /dev/null @@ -1,10 +0,0 @@ -READ_PERMISSION = 4 -WRITE_PERMISSION = 2 -EXECUTE_PERMISSION = 1 - -userPermissions = READ_PERMISSION | WRITE_PERMISSION - -userPermissions ^= WRITE_PERMISSION - -print(userPermissions) -print(bin(userPermissions)) \ No newline at end of file diff --git a/README.md b/README.md index 5f371d4..6c35226 100644 --- a/README.md +++ b/README.md @@ -12,5 +12,5 @@ I will add new code as soon as I am done editing the videos. So, you might find | 2022-12-09 | [Big O Notation](https://youtu.be/aIG48ldbpRI) | [code](/alexhyett/big-o-notation) | | 2022-11-25 | [Stack vs Heap](https://youtu.be/5OJRqkYbK-4) | [code](/alexhyett/stack-vs-heap) | | 2022-11-11 | [Automate Your Life With Python](https://youtu.be/1dgnl7oCVTY) | [code](/alexhyett/automate-python-example) | -| 2022-10-21 | [Bitwise Operators and WHY we use them](https://youtu.be/igIjGxF2J-w) | [code](2022-10-21-Bitwise-Operators-and-WHY-we-use-them) | +| 2022-10-21 | [Bitwise Operators and WHY we use them](https://youtu.be/igIjGxF2J-w) | [code](/alexhyett/bitwise-operators-example) | | 2022-10-10 | [6 Coding Concepts You MUST Know For Beginners](https://youtu.be/pKFcVs2HibA) | [code](2022-10-10-6-Coding-Concepts-You-MUST-Know-For-Beginners) |