Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bb46e1a

Browse files
committedMay 28, 2024·
Fix errrors in multibit_manipulation
Few typos, doctest error
1 parent c7d9135 commit bb46e1a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎bit_manipulation/multibit_manipulation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
- OR that into the working 0b10111000, that is, ( 0b10111000 | 0b101 )
4343
-> 0b10111101.
4444
45-
To remove the center two bits of 0b101101 -> 0b1001, the proces is mostly
46-
the same, but ...
45+
To remove the center two bits of 0b101101 -> 0b1001, the process is mostly
46+
the same.
4747
4848
- The initial right shift is index(2) + bit_length(2), taking out the two
4949
middle bits and producing 0b10.
@@ -194,9 +194,9 @@ def multibit_insert(bint: int, index: int, bit_len: int, value: int) -> int:
194194
57
195195
>>> multibit_insert(22, 0, 1, 1)
196196
45
197-
>>> multibit_set(22, 2, 1, 0)
198-
18
199-
>>> multibit_set(22, 2, 1, 3) is None
197+
>>> multibit_insert(22, 2, 1, 0)
198+
42
199+
>>> multibit_insert(22, 2, 1, 3) is None
200200
True
201201
"""
202202

0 commit comments

Comments
 (0)
Please sign in to comment.