EMBEDDED TOOLKIT

SYSTEMS R&D // DEV_TOOLS SUITE

Tools (65)

register compare

SYSTEM ONLINE

Register A (Operand)

00000000 00000000 11111111 11111111

Register B (Mask / Second Operand)

00001111 00001111 00001111 00001111

Logical Operations Results (Bitwise Logic)

OPERATIONHEXAPPLICATION
A AND B (&)0x00000F0FMask (extracting common bits)
A OR B (|)0x0F0FFFFFLogical sum (setting bits)
A XOR B (^)0x0F0FF0F0Symmetric difference (toggling bits)
NOT A (~)0xFFFF0000Not A
NOT B (~)0xF0F0F0F0Not B

📖 How to use Register Compare (Logic Calculator)?

The Register Compare tool is essentially a classic 32-bit bitwise operation calculator, essential for creating masks in C. Instead of opening Python in the terminal, you paste two values here and immediately see the full spectrum of logical operations.

1. Basic Operators
  • AND (&): Ideal for testing masks. If you want to check if certain bits in the register (A) are set according to the mask (B).
  • OR (|): Checking the result of enabling bits - i.e., applying a mask (B) to the current register state (A).
2. Advanced Operators
  • XOR (^): Excellent for toggling specific bits, e.g., blinking an LED connected to a GPIO pin.
  • NOT (~): Inverting all 32 bits (one's complement). Required, e.g., when masking bits to clear: REG &= ~MASK;