8000 TheAlgorithms_Python/bit_manipulation at linked_list · mindaugl/TheAlgorithms_Python · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"path":"bit_manipulation","repo":{"id":960335007,"defaultBranch":"master","name":"TheAlgorithms_Python","ownerLogin":"mindaugl","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2025-04-04T08:59:00.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/76015221?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"linked_list","listCacheKey":"v0:1748882673.0","canEdit":false,"refType":"branch","currentOid":"a32778b3b6d97b7ee6b7dd64b24cd0f523dca07c"},"tree":{"items":[{"name":"README.md","path":"bit_manipulation/README.md","contentType":"file"},{"name":"__init__.py","path":"bit_manipulation/__init__.py","contentType":"file"},{"name":"binary_and_operator.py","path":"bit_manipulation/binary_and_operator.py","contentType":"file"},{"name":"binary_coded_decimal.py","path":"bit_manipulation/binary_coded_decimal.py","contentType":"file"},{"name":"binary_count_setbits.py","path":"bit_manipulation/binary_count_setbits.py","contentType":"file"},{"name":"binary_count_trailing_zeros.py","path":"bit_manipulation/binary_count_trailing_zeros.py","contentType":"file"},{"name":"binary_or_operator.py","path":"bit_manipulation/binary_or_operator.py","contentType":"file"},{"name":"binary_shifts.py","path":"bit_manipulation/binary_shifts.py","contentType":"file"},{"name":"binary_twos_complement.py","path":"bit_manipulation/binary_twos_complement.py","contentType":"file"},{"name":"binary_xor_operator.py","path":"bit_manipulation/binary_xor_operator.py","contentType":"file"},{"name":"bitwise_addition_recursive.py","path":"bit_manipulation/bitwise_addition_recursive.py","contentType":"file"},{"name":"count_1s_brian_kernighan_method.py","path":"bit_manipulation/count_1s_brian_kernighan_method.py","contentType":"file"},{"name":"count_number_of_one_bits.py","path":"bit_manipulation/count_number_of_one_bits.py","contentType":"file"},{"name":"excess_3_code.py","path":"bit_manipulation/excess_3_code.py","contentType":"file"},{"name":"find_previous_power_of_two.py","path":"bit_manipulation/find_previous_power_of_two.py","contentType":"file"},{"name":"find_unique_number.py","path":"bit_manipulation/find_unique_number.py","contentType":"file"},{"name":"gray_code_sequence.py","path":"bit_manipulation/gray_code_sequence.py","contentType":"file"},{"name":"highest_set_bit.py","path":"bit_manipulation/highest_set_bit.py","contentType":"file"},{"name":"index_of_rightmost_set_bit.py","path":"bit_manipulation/index_of_rightmost_set_bit.py","contentType":"file"},{"name":"is_even.py","path":"bit_manipulation/is_even.py","contentType":"file"},{"name":"is_power_of_two.py","path":"bit_manipulation/is_power_of_two.py","contentType":"file"},{"name":"largest_pow_of_two_le_num.py","path":"bit_manipulation/largest_pow_of_two_le_num.py","contentType":"file"},{"name":"missing_number.py","path":"bit_manipulation/missing_number.py","contentType":"file"},{"name":"numbers_different_signs.py","path":"bit_manipulation/numbers_different_signs.py","contentType":"file"},{"name":"power_of_4.py","path":"bit_manipulation/power_of_4.py","contentType":"file"},{"name":"reverse_bits.py","path":"bit_manipulation/reverse_bits.py","contentType":"file"},{"name":"single_bit_manipulation_operations.py","path":"bit_manipulation/single_bit_manipulation_operations.py","contentType":"file"},{"name":"swap_all_odd_and_even_bits.py","path":"bit_manipulation/swap_all_odd_and_even_bits.py","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eBit manipulation\u003c/h1\u003e\u003ca id=\"user-content-bit-manipulation\" class=\"anchor\" aria-label=\"Permalink: Bit manipulation\" href=\"#bit-manipulation\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eBit manipulation is the act of manipulating bits to detect errors (hamming code), encrypts and decrypts messages (more on that in the 'ciphers' folder) or just do anything at the lowest level of your computer.\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Bit_manipulation\" rel=\"nofollow\"\u003ehttps://en.wikipedia.org/wiki/Bit_manipulation\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://docs.python.org/3/reference/expressions.html#binary-bitwise-operations\" rel=\"nofollow\"\u003ehttps://docs.python.org/3/reference/expressions.html#binary-bitwise-operations\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations\" rel=\"nofollow\"\u003ehttps://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types\" rel=\"nofollow\"\u003ehttps://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://wiki.python.org/moin/BitManipulation\" rel=\"nofollow\"\u003ehttps://wiki.python.org/moin/BitManipulation\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://wiki.python.org/moin/BitwiseOperators\" rel=\"nofollow\"\u003ehttps://wiki.python.org/moin/BitwiseOperators\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.tutorialspoint.com/python3/bitwise_operators_example.htm\" rel=\"nofollow\"\u003ehttps://www.tutorialspoint.com/python3/bitwise_operators_example.htm\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/article\u003e","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Bit manipulation","anchor":"bit-manipulation","htmlText":"Bit manipulation"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fmindaugl%2FTheAlgorithms_Python%2Ftree%2Flinked_list%2Fbit_manipulation"}},"totalCount":28,"showBranchInfobar":true},"fileTree":{"":{"items":[{"name":".devcontainer","path":".devcontainer","contentType":"directory"},{"name":".github","path":".github","contentType":"directory"},{"name":".vscode","path":".vscode","contentType":"directory"},{"name":"audio_filters","path":"audio_filters","contentType":"directory"},{"name":"backtracking","path":"backtracking","contentType":"directory"},{"name":"bit_manipulation","path":"bit_manipulation","contentType":"directory"},{"name":"blockchain","path":"blockchain","contentType":"directory"},{"name":"boolean_algebra","path":"boolean_algebra","contentType":"directory"},{"name":"cellular_automata","path":"cellular_automata","contentType":"directory"},{"name":"ciphers","path":"ciphers","contentType":"directory"},{"name":"computer_vision","path":"computer_vision","contentType":"directory"},{"name":"conversions","path":"conversions","contentType":"directory"},{"name":"data_compression","path":"data_compression","contentType":"directory"},{"name":"data_structures","path":"data_structures","contentType":"directory"},{"name":"digital_image_processing","path":"digital_image_processing","contentType":"directory"},{"name":"divide_and_conquer","path":"divide_and_conquer","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"dynamic_programming","path":"dynamic_programming","contentType":"directory"},{"name":"electronics","path":"electronics","contentType":"directory"},{"name":"file_transfer","path":"file_transfer","contentType":"directory"},{"name":"financial","path":"financial","contentType":"directory"},{"name":"fractals","path":"fractals","contentType":"directory"},{"name":"fuzzy_logic","path":"fuzzy_logic","contentType":"directory"},{"name":"genetic_algorithm","path":"genetic_algorithm","contentType":"directory"},{"name":"geodesy","path":"geodesy","contentType":"directory"},{"name":"geometry","path":"geometry","contentType":"directory"},{"name":"graphics","path":"graphics","contentType":"directory"},{"name":"graphs","path":"graphs","contentType":"directory"},{"name":"greedy_methods","path":"greedy_methods","contentType":"directory"},{"name":"hashes","path":"hashes","contentType":"directory"},{"name":"knapsack","path":"knapsack","contentType":"directory"},{"name":"linear_algebra","path":"linear_algebra","contentType":"directory"},{"name":"linear_programming","path":"linear_programming","contentType":"directory"},{"name":"machine_learning","path":"machine_learning","contentType":"directory"},{"name":"maths","path":"maths","contentType":"directory"},{"name":"matrix","path":"matrix","contentType":"directory"},{"name":"networking_flow","path":"networking_flow","contentType":"directory"},{"name":"neural_network","path":"neural_network","contentType":"directory"},{"name":"other","path":"other","contentType":"directory"},{"name":"physics","path":"physics","contentType":"directory"},{"name":"project_euler","path":"project_euler","contentType":"directory"},{"name":"quantum","path":"quantum","contentType":"directory"},{"name":"scheduling","path":"scheduling","contentType":"directory"},{"name":"scripts","path":"scripts","contentType":"directory"},{"name":"searches","path":"searches","contentType":"directory"},{"name":"sorts","path":"sorts","contentType":"directory"},{"name":"strings","path":"strings","contentType":"directory"},{"name":"web_programming","path":"web_programming","contentType":"directory"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".gitpod.yml","path":".gitpod.yml","contentType":"file"},{"name":".pre-commit-config.yaml","path":".pre-commit-config.yaml","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"DIRECTORY.md","path":"DIRECTORY.md","contentType":"file"},{"name":"LICENSE.md","path":"LICENSE.md","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"index.md","path":"index.md","contentType":"file"},{"name":"pyproject.toml","path":"pyproject.toml","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"},{"name":"uv.lock","path":"uv.lock","contentType":"file"}],"totalCount":60}},"fileTreeProcessingTime":17.110232,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/mindaugl/TheAlgorithms_Python/branches":{"post":"cl8ED3AGcvmuv61h8lCDHq9hf3hhY0JrIwhosA1hwxVgNySSbdnqjToe63uE7J0mw7IazVtixDvP0qrSpN_W7A"},"/mindaugl/TheAlgorithms_Python/branches/fetch_and_merge/linked_list":{"post":"qqIQNLOH0LoyogaomVfZ_AD_cRS67eXkhjDt8AwE-omfjgAzwzxQu5twipw48yZ09wXekXhm5QWmmSffC3BsxA"},"/mindaugl/TheAlgorithms_Python/branches/fetch_and_merge/linked_list?discard_changes=true":{"post":"QKJ7d1qMj_iQw0LWN_UDJTi08z81fYXMBinTBfZVJbR1jmtwKjcP-TkRzuKWUfytz05cuvf2hS0mgBkq8SGz-Q"}}},"title":"TheAlgorithms_Python/bit_manipulation at linked_list · mindaugl/TheAlgorithms_Python","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-b84e9496fc59.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0