Skip to content

Commit 6911d3b

Browse files
committed
More testing
1 parent ec0fe34 commit 6911d3b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bit_manipulation/binary_shifts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ def logical_left_shift(a: int, b: int) -> str:
88
i.e. (a << b)
99
Return the shifted binary representation.
1010
11+
>>> logical_left_shift(0, 1)
12+
'0b00'
1113
>>> logical_left_shift(1, 1)
1214
'0b10'
1315
>>> logical_left_shift(1, 5)
@@ -36,6 +38,8 @@ def logical_right_shift(a: int, b: int) -> str:
3638
i.e. (a >> b)
3739
Return the shifted binary representation.
3840
41+
>>> logical_right_shift(0, 1)
42+
'0b0'
3943
>>> logical_right_shift(1, 1)
4044
'0b0'
4145
>>> logical_right_shift(1, 5)

0 commit comments

Comments
 (0)