Question 1191545
<font color=black size=3>
Part (a)


We'll be doing a bitwise "AND" operation here.
If the inputs are both 1, then the output is 1. Otherwise the result is 0.


It helps to set up a table or grid like this to line up the digits.
<table border = "1" cellpadding = "5"><tr><td>A</td><td>1</td><td>1</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>1</td></tr><tr><td>B</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td></tr><tr><td>A AND B (bitwise)</td><td>1</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></table>


Answer: 10100000


============================================================================
Part (b)


The "NAND" operator means "NOT AND".
What we do is first use the "AND" like normal, but then negate the result.
Here's a reference table
<table border = "1" cellpadding = "5"><tr><td>A</td><td>B</td><td>A AND B</td><td>A NAND B</td></tr><tr><td>0</td><td>0</td><td>0</td><td>1</td></tr><tr><td>0</td><td>1</td><td>0</td><td>1</td></tr><tr><td>1</td><td>0</td><td>0</td><td>1</td></tr><tr><td>1</td><td>1</td><td>1</td><td>0</td></tr></table>
The last two columns are complements of one another (aka opposites)
Note the first two columns represent the sequence 00, 01, 10, 11 which is counting from 0 base 10 to 3 base 10 in binary.


Therefore we can form this bitwise NAND table for the given inputs
<table border = "1" cellpadding = "5"><tr><td>A</td><td>1</td><td>1</td><td>1</td><td>1</td><td>0</td><td>0</td><td>0</td><td>1</td></tr><tr><td>B</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td></tr><tr><td>A NAND B (bitwise)</td><td>0</td><td>1</td><td>0</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
As you can see, the bottom row for NAND is the flipped version of the result of part (a) earlier.


Answer: 01011111
I'm keeping the leading zero because it helps retain the same string length as all the other binary numbers (and it helps show the connection to part a better).
Though of course you could easily remove that first 0.
</font>