From ef51d3144185dab8d4138eee0abcc8d7beb651b6 Mon Sep 17 00:00:00 2001 From: bt3gl <138340846+bt3gl-cryptographer@users.noreply.github.com> Date: Tue, 8 Aug 2023 17:38:12 -0700 Subject: [PATCH] Update README.md --- bit_operations/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bit_operations/README.md b/bit_operations/README.md index 98c29c1..d41b63c 100644 --- a/bit_operations/README.md +++ b/bit_operations/README.md @@ -148,7 +148,7 @@ def convert_to_hex(num: int) -> str: - `OR` and `AND`: symmetrical operations. - `XOR`: when the corresponding bits of the two numbers are the same, the result is `1`. - negation is unary: just flips the bit. - - left shift operation, `<<`, all binary bits are shift to the left (the high bits are discarded, and the low bits are filled with 0). for left shift operations, arithmetic shift and logical shift are the same. + - left shift operation, `<<`, all binary bits are shifted to the left (the high bits are discarded, and the low bits are filled with 0). for left shift operations, arithmetic shift and logical shift are the same. - right shift operation, `>>`, all binary bits are shift to the right (low bits are discarded). how the high bits get filled differs between arithmetic shift and logical shift: - when shifting right arithmetically, the high bits are filled with the highest bit. - when shifting right logically, the high bits are filled with `0`.