Tag

bitwise

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 14, 2025 · Frontend Development

Using Bitwise Operations for Efficient Permission Management in Frontend Development

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.

JavaScriptPerformanceVue
0 likes · 11 min read
Using Bitwise Operations for Efficient Permission Management in Frontend Development
Java Tech Enthusiast
Java Tech Enthusiast
Jan 24, 2025 · Fundamentals

Sum of Two Integers Without Using + or - Operators

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.

Pythonalgorithmbitwise
0 likes · 4 min read
Sum of Two Integers Without Using + or - Operators
macrozheng
macrozheng
Jul 19, 2024 · Backend Development

Master Java Obfuscation: 5 Crazy Tricks to Write Unreadable Code

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.

JavaUnicodeUnsafe
0 likes · 12 min read
Master Java Obfuscation: 5 Crazy Tricks to Write Unreadable Code
Test Development Learning Exchange
Test Development Learning Exchange
Aug 15, 2023 · Fundamentals

Python Operators: Arithmetic, Assignment, Comparison, Boolean, Bitwise, and Precedence

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.

ArithmeticAssignmentBoolean
0 likes · 8 min read
Python Operators: Arithmetic, Assignment, Comparison, Boolean, Bitwise, and Precedence
macrozheng
macrozheng
Sep 6, 2022 · Backend Development

How to Write Java Code That Even Your Colleagues Can’t Understand

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.

JavaUnsafebitwise
0 likes · 14 min read
How to Write Java Code That Even Your Colleagues Can’t Understand
Sohu Tech Products
Sohu Tech Products
Apr 1, 2020 · Fundamentals

Bitwise Operations: Techniques and Applications in Algorithmic Problems

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.

Bit ManipulationOptimizationalgorithm
0 likes · 17 min read
Bitwise Operations: Techniques and Applications in Algorithmic Problems
Selected Java Interview Questions
Selected Java Interview Questions
Feb 26, 2020 · Backend Development

Java Interview Question: Determining Whether an Integer Is Odd – Discussion and Solutions

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.

InterviewJavaOddNumber
0 likes · 5 min read
Java Interview Question: Determining Whether an Integer Is Odd – Discussion and Solutions
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Jun 28, 2019 · Fundamentals

Bitwise Optimization Techniques for Counting Set Bits in 32‑Bit Integers

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++OptimizationPerformance
0 likes · 10 min read
Bitwise Optimization Techniques for Counting Set Bits in 32‑Bit Integers
Java Captain
Java Captain
May 28, 2019 · Fundamentals

Five Classic Bitwise Operation Techniques in Java

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.

JavaOptimizationPerformance
0 likes · 10 min read
Five Classic Bitwise Operation Techniques in Java