Bit Operation Simulator
Visually simulate bitwise operations
How to Use
- Enter numbers in the Value A and Value B input fields respectively
- Select the input format (binary, decimal, hexadecimal)
- Select the bit width (8, 16, or 32 bits)
- Select the operation (AND, OR, XOR, NOT, shift, etc.)
- The operation results are displayed in bit display and each format
Use Cases
- When visually checking bit operations on registers in embedded software development
- When understanding flag set, clear, and toggle operations
- When checking the creation of bitmasks and their application results
- When visually understanding bit operation behavior in information processing learning
Frequently Asked Questions
Does it support two's complement representation? ▼
Yes, it supports two's complement representation as signed integers. For 8-bit, it can handle the range -128 to 127, and for 16-bit, -32768 to 32767.
How does the NOT operation work? ▼
The NOT operation inverts each bit of Value A. Value B is not used. Inversion is performed according to the selected bit width.
What types of shift operations are there? ▼
It supports left shift (<<), logical right shift (>>>), and arithmetic right shift (>>). The sign bit is preserved in arithmetic right shift.
Related Tools
Base Converter
Convert numbers between any bases such as binary, octal, decimal, and hexadecimal
Resistor Color Code Calculator
Calculate resistance value from color code, or reverse lookup color code from resistance value
Ohm's Law Calculator
Mutual calculation of voltage, current, resistance, and power
LED Resistor Calculator
Calculate current-limiting resistor for LED circuits
UART Baud Rate Calculator
Calculate divisor ratio, error, and register values from clock frequency and target baud rate
PWM/Timer Configuration Calculator
Calculate and reverse-calculate PWM frequency, duty, resolution, and register settings (PSC/ARR/CCR) from clock and prescaler/counter values
Timer Interrupt Period / Clock Divider Calculator
Calculate interrupt period and frequency from clock, prescaler, and count value. Reverse-calculate optimal PSC/ARR from target period
ADC Resolution, LSB, and Voltage Calculator
Calculate LSB voltage, quantization error, dynamic range, code↔voltage conversion, ENOB, and oversampling from resolution and reference voltage