Perform the bitwise operation AND
on the numbers ~7 & ~8
Since Number 1 of 7 is not in binary form, we need to convert it to binary format
From this conversion, we get 111 as our binary number
Since Number 2 of 8 is not in binary form, we need to convert it to binary format
From this conversion, we get 1000 as our binary number
For 1, switch all 1's with 0's and all 0's with 1's
1 → 0
1 → 0
1 → 0
Our negation number is 000
For 2, switch all 1's with 0's and all 0's with 1's
1 → 0
0 → 1
0 → 1
0 → 1
Our negation number is 0000111
Make sure each of binary term has a length of 4,
the length of our longest binary number
For a bitwise AND operation, both bit 1 AND bit 2 need to be 1
For bit 1, this is not the case: 0 AND 0 = 0
For a bitwise AND operation, both bit 1 AND bit 2 need to be 1
For bit 2, this is not the case: 0 AND 1 = 0
For a bitwise AND operation, both bit 1 AND bit 2 need to be 1
For bit 3, this is not the case: 0 AND 1 = 0
For a bitwise AND operation, both bit 1 AND bit 2 need to be 1
For bit 4, this is not the case: 0 AND 1 = 0
0 | 0 | 0 | 0 | ||
AND | 0 | 1 | 1 | 1 | |
= | 0 | 0 | 0 | 0 |
Using our binary calculator, we can convert 00001110000 to an integer.