Binary Arithmetic Calculator — Formula
## Binary Arithmetic
### Bitwise Operations
- **AND**: both bits must be 1 → result is 1
- **OR**: at least one bit must be 1 → result is 1
- **XOR**: exactly one bit must be 1 → result is 1
### Example: 42 AND 15
- 42 in binary: 101010
- 15 in binary: 001111
- AND result: 001010 = 10
Bitwise operations work on individual bits of the binary representation.
### Bitwise Operations
- **AND**: both bits must be 1 → result is 1
- **OR**: at least one bit must be 1 → result is 1
- **XOR**: exactly one bit must be 1 → result is 1
### Example: 42 AND 15
- 42 in binary: 101010
- 15 in binary: 001111
- AND result: 001010 = 10
Bitwise operations work on individual bits of the binary representation.
Esempio Risolto
Binary operations on 42 and 15.
- 42 + 15 = 57
- 42 - 15 = 27
- 42 AND 15: 101010 AND 001111 = 001010 = 10
- 42 OR 15: 101010 OR 001111 = 101111 = 47
- 42 XOR 15: 101010 XOR 001111 = 100101 = 37