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)
| OPERATION | HEX | BINARY | APPLICATION |
|---|---|---|---|
| A AND B (&) | 0x00000F0F | 00000000 00000000 00001111 00001111 | Mask (extracting common bits) |
| A OR B (|) | 0x0F0FFFFF | 00001111 00001111 11111111 11111111 | Logical sum (setting bits) |
| A XOR B (^) | 0x0F0FF0F0 | 00001111 00001111 11110000 11110000 | Symmetric difference (toggling bits) |
| NOT A (~) | 0xFFFF0000 | 11111111 11111111 00000000 00000000 | Not A |
| NOT B (~) | 0xF0F0F0F0 | 11110000 11110000 11110000 11110000 | Not 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;