Bitwise calculator

Calculate bitwise calculator with clear inputs and assumptions.

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); // 10
TypeScript
const result: number = 42 & 15;
console.log(result); // 10
Python
print(42 & 15)  # 10
Java
System.out.println(42 & 15); // 10
C#
Console.WriteLine(42 & 15); // 10
More languages
C
#include <stdio.h>
int main(void) { printf("%d\n", 42 & 15); } // 10
C++
#include <iostream>
int main() { std::cout << (42 & 15); } // 10
PHP
echo 42 & 15; // 10
PowerShell
42 -band 15 # 10