Which of the following bit patterns represents the decimal value -24 in two\'s c
ID: 3723981 • Letter: W
Question
Which of the following bit patterns represents the decimal value -24 in two's complement notation
NOTE: Space between digits is for readability
while n > 0 or n > 100:
generate an error message
while n > 0 and n < 100:
generate an error message
while n < 0 and n > 100:
generate an error message
while n < 0 or n > 100:
generate an error message
D
X
C
None of the above
Suppose we want a program to request an integer (n) repeatedly until it is in the range 0 to 100 inclusive that is we want 0 <= n <= 100. Which of the following is the best input validation loop?
101 1011
110 1000
101 0011
111 1010
Suppose the letter A is placed in an empty queue, followed by the letters B C D E and F in that order. Now suppose a letter is removed from the queue and letter G are inserted. Now suppose two letters are removed from the queue and letter X is inserted into the queue. If a letter is removed from the queue which letter would it be ?
Explanation / Answer
1) Which of the following bit patterns represents the decimal value -24 in two's
Answer: 110 1000
2) Suppose we want a program to request an integer (n) repeatedly until it is in the range 0 to 100 inclusive that is we want 0 <= n <= 100.
Which of the following is the best input validation loop?
Answer:
while n < 0 or n > 100:
generate an error message
3) Suppose the letter A is placed in an empty queue, followed by the letters B C D E and F in that order.
Now suppose a letter is removed from the queue and letter G are inserted.
Now suppose two letters are removed from the queue and letter X is inserted into the queue.
If a letter is removed from the queue which letter would it be ?
Answer: E is removed
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.