a = 0b1010
b = 0b0110
result = a | b
print(bin(result))
#Python
xxxxxxxxxx
const a = 0b1010;
const b = 0b0110;
const result = a | b;
console.log(result.toString(2));
//JavaScript
public class Main {
public static void main(String[] args) {
int a = 0b1010;
int b = 0b0110;
int result = a | b;
System.out.println(Integer.toBinaryString(result));
}
//Java
#include <iostream>
#include <bitset>
using namespace std;
int main() {
cout << bitset<4>(result);
return 0;
//C++