1)#include <iostream>
using namespace std;
int main() {
int a=1,b=1,c=0,d=1;
int otvet=a*(-1)+b^c-d;
cout<<otvet;
}
2)#include <iostream>
int a = 1, b = 1, c = 1, d = 1;
3)#include <iostream>
int a = 0, b = 0, c = 0, d = 0;
4)#include <iostream>
int a = 0, b = 1, c = 1, d = 0;
int otvet=-(a+b^c+(-b))+a^d;
5)#include <iostream>
int a = 1, b = 0, c = 0, d = 1;
6)#include <iostream>
7)#include <iostream>
Объяснение:
0001 = 2^3*0 + 2^2*0 + 2^1*0 + 2^0*1 = 0 + 0 + 0 + 1 = 1
0110 = 2^3*0 + 2^2*1 + 2^1*1 + 2^0*0 = 0 + 4 + 2 + 0 = 6
0001 = 2^3*0 + 2^2*0 + 2^1*0 + 2^0*1 = 0 + 0 + 0 + 1 = 1
0101 = 2^3*0 + 2^2*1 + 2^1*0 + 2^0*1 = 0 + 4 + 0 + 1 = 5
0100 = 2^3*0 + 2^2*1 + 2^1*0 + 2^0*0 = 0 + 4 + 0 + 0 = 4
1001 = 2^3*1 + 2^2*0 + 2^1*0 + 2^0*1 = 8 + 0 + 0 + 1 = 9
Если это одно большое число, то вот так
1000000101100001010101001001 = 2^27*1 + 2^26*0 + 2^25*0 + 2^24*0 + 2^23*0 + 2^22*0 + 2^21*0 + 2^20*1 + 2^19*0 + 2^18*1 + 2^17*1 + 2^16*0 + 2^15*0 + 2^14*0 + 2^13*0 + 2^12*1 + 2^11*0 + 2^10*1 + 2^9*0 + 2^8*1 + 2^7*0 + 2^6*1 + 2^5*0 + 2^4*0 + 2^3*1 + 2^2*0 + 2^1*0 + 20*1 = 134217728 + 0 + 0 + 0 + 0 + 0 + 0 + 1048576 + 0 + 262144 + 131072 + 0 + 0 + 0 + 0 + 4096 + 0 + 1024 + 0 + 256 + 0 + 64 + 0 + 0 + 8 + 0 + 0 + 1 = 135664969
^ - Возведение в степень
1)#include <iostream>
using namespace std;
int main() {
int a=1,b=1,c=0,d=1;
int otvet=a*(-1)+b^c-d;
cout<<otvet;
}
2)#include <iostream>
using namespace std;
int main() {
int a = 1, b = 1, c = 1, d = 1;
int otvet=a*(-1)+b^c-d;
cout<<otvet;
}
3)#include <iostream>
using namespace std;
int main() {
int a = 0, b = 0, c = 0, d = 0;
int otvet=a*(-1)+b^c-d;
cout<<otvet;
}
4)#include <iostream>
using namespace std;
int main() {
int a = 0, b = 1, c = 1, d = 0;
int otvet=-(a+b^c+(-b))+a^d;
cout<<otvet;
}
5)#include <iostream>
using namespace std;
int main() {
int a = 1, b = 0, c = 0, d = 1;
int otvet=-(a+b^c+(-b))+a^d;
cout<<otvet;
}
6)#include <iostream>
using namespace std;
int main() {
int a = 1, b = 1, c = 1, d = 1;
int otvet=-(a+b^c+(-b))+a^d;
cout<<otvet;
}
7)#include <iostream>
using namespace std;
int main() {
int a = 0, b = 0, c = 0, d = 0;
int otvet=-(a+b^c+(-b))+a^d;
cout<<otvet;
}
Объяснение: