Tagged articles
bitwise
19 articles · Page 1 of 1
The article explains why beginners often misuse ^, &, and | in Python—mistaking them for exponentiation or logical operators—and clarifies the proper use of bitwise operators, the ** exponent operator, and the logical and/or keywords with concrete code examples.
Pythonbitwiseexponentiation
0 likes · 4 min read

This article explores how bitwise operators can replace verbose boolean checks for permission handling, drawing examples from React Fiber, Vue3 virtual DOM, and common algorithmic problems, and provides a step‑by‑step guide to building a compact, high‑performance permission system in JavaScript.
Vuebitwisepermission
0 likes · 11 min read

The problem asks to add two integers without using '+' or '-', which is solved by repeatedly applying bitwise XOR to obtain the sum without carry and left‑shifted AND to compute the carry until it vanishes, as demonstrated in concise Java and Python implementations with O(1) time and space complexity.
Algorithmbitwiseno-plus-minus
0 likes · 4 min read

Bitwise operations manipulate binary digits directly, offering fast, low‑level computation for tasks such as arithmetic optimization, parity checks, power‑of‑two detection, swapping values, counting set bits, bitmasking, and hash table enhancements, with clear examples and Go code illustrations throughout the guide.
Algorithmbinarybitwise
0 likes · 7 min read

This guide shows how to add the bitflags crate to a Rust project, define a Permissions flag struct using the bitflags! macro, and perform common operations such as checking, inserting, and removing flags, while explaining the automatically derived traits and useful helper methods.
RustSystems Programmingbitflags
0 likes · 3 min read

This article reveals five advanced Java tricks—using Unicode escapes in comments, over‑complicating simple logic with bitwise shifts, tampering with Boolean.TRUE via reflection, forcing both branches of an if‑else to run, and leveraging the Unsafe class for low‑level memory manipulation—to deliberately make code hard to understand.
JavaReflectionUnicode
0 likes · 12 min read

This guide explains Go's various operators—including arithmetic, assignment, relational, logical, bitwise, and pointer operators—provides clear code samples for each type, demonstrates their output, and clarifies how they behave in different scenarios.
ArithmeticGobitwise
0 likes · 10 min read

This article explains Python's arithmetic, assignment, comparison, Boolean, and bitwise operators, provides example code for each, and outlines the language's operator precedence rules to help developers write correct and readable expressions.
Arithmeticassignmentbitwise
0 likes · 8 min read

This article explains the fundamentals of bitwise operations in C, covering their advantages, operator symbols, precedence, common tricks such as parity checks, power‑of‑two tests, swapping values, bit masks, and includes numerous code snippets and practical examples for efficient low‑level programming.
algorithm tricksbit-manipulationbitwise
0 likes · 13 min read

Explore a series of unconventional Java tricks—from Unicode escape hacks and bitwise tricks to reflection-based Boolean tampering and Unsafe memory manipulation—that let you deliberately obfuscate code, making it hard for teammates to read, modify, or even predict its behavior.
JavaReflectionUnsafe
0 likes · 14 min read

This article explores why the naïve (a + b) / 2 formula overflows for 32‑bit unsigned integers and presents several safe techniques—including subtraction‑first, bitwise‑based, wide‑type casting, and carry‑rotate instructions—complete with C++ code and assembly examples.
C++assemblyaverage
0 likes · 11 min read

This article introduces the XOR (exclusive OR) operation, explains binary representation of numbers, demonstrates how XOR can swap two integer values without a temporary variable, and provides a concise C code example illustrating the technique.
bitwisevariable swapxor
0 likes · 4 min read

Learn how to automate a web-based Sudoku game using Python's Selenium for data extraction, implement an efficient backtracking and bitwise algorithm to solve the puzzle, and programmatically fill the solution back into the browser, achieving performance improvements from 17 seconds to just over 3 seconds.
PythonSudokuautomation
0 likes · 11 min read

This article introduces the basics of bitwise operations, common operators, practical tricks such as checking parity, setting or clearing bits, and demonstrates their use in solving classic algorithmic challenges like the poison bottle puzzle, power‑of‑two detection, counting set bits, and the 8‑Queens problem.
Algorithmbit-manipulationbitwise
0 likes · 17 min read

This article walks through a common Java interview problem of checking if an integer is odd, presenting multiple candidate solutions, explaining their shortcomings, and culminating in an optimal bitwise implementation while also discussing performance misconceptions.
AlgorithmInterviewJava
0 likes · 5 min read

The article explores how bitwise operations can dramatically speed up counting the number of set bits in a 32‑bit integer, presenting a naive O(n) solution and four successive optimizations that reduce runtime from about two seconds to under a tenth of a second, while sharing practical low‑level coding tricks.
C++bitwiselow-level
0 likes · 10 min read

This article introduces five classic bitwise operation examples in Java—including checking odd/even, swapping variables without a temporary, finding a unique number, fast exponentiation, and determining the greatest power of two not exceeding N—explaining the underlying binary logic, code implementations, and their efficiency advantages.
AlgorithmJavabinary
0 likes · 10 min read

This article provides a comprehensive overview of Scala's built-in operators, detailing arithmetic, relational, logical, bitwise, and assignment operators with descriptions, example tables, and runnable code snippets illustrating their usage and precedence in practice.
ArithmeticLogicalScala
0 likes · 13 min read

This tutorial explains Java's signed two's complement representation, demonstrates how to output binary strings, covers all bitwise operators (AND, OR, XOR, NOT, shifts), clarifies original/one's/complement forms, shows overflow handling, unsigned tricks with masking, and teaches packing multiple boolean flags into a single byte for efficient storage.
binarybit operationsbitwise
0 likes · 18 min read
