
Bitwise calculator
Calculate bitwise calculator with clear inputs and assumptions.
Your inputs stay in your browser. Displayed results are rounded to a maximum of 12 significant digits.
Method and assumptions
Method version 1.0.0 · Updated
Calculate
Formula: Calculate bitwise calculator with clear inputs and assumptions.
Calculate bitwise calculator with clear inputs and assumptions.
- a
- Integer A
- b
- Integer B / shift
- operation
- Operation
Results are estimates where noted and depend on the entered assumptions.
Calculate with code
These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.
JavaScript
const result = 42 & 15;
console.log(result); // 10TypeScript
const result: number = 42 & 15;
console.log(result); // 10Python
print(42 & 15) # 10Java
System.out.println(42 & 15); // 10C#
Console.WriteLine(42 & 15); // 10More languages
C
#include <stdio.h>
int main(void) { printf("%d\n", 42 & 15); } // 10C++
#include <iostream>
int main() { std::cout << (42 & 15); } // 10PHP
echo 42 & 15; // 10PowerShell
42 -band 15 # 10