Consider the 9-bit two's complement number 011100010.
Give the base 10 value of this number.
Add this two's complement number to itself and convert the result to
base 10. Explain your answer.
What is the largest 9-bit
two's complement number you can add to itself without having this
problem?
What is the smallest (most negative) 9-bit two's complement number you
can add to itself without having a similar problem?
Use the laws of logic to simplify the following logic statement. Show
what law you are applying at each step.
NOT(NOT p OR q) AND NOT(p AND (NOT q OR p))
Write code that asks the user to enter a valid password, where a valid
password must have at least 6 characters and cannot be the string
"Roanoke".
Keep asking
for passwords until the user enters one of the appropriate length, and
count how many tries it takes them to get it right.
When they do enter a valid password, print the number of tries it took
(including the last try, where the password was valid).