Question: 1.Convert the following binary representation to its equivalent base 10 notation 010001 19 17 18 20 2.In a 2's complement system what decimal value is

1.Convert the following binary representation to its equivalent base 10 notation

010001

19

17

18

20

2.In a 2's complement system what decimal value is represented by 1111 ?

15

-1

-15

7

3.What is the output if the follwing python code was executed ?

X = 4 Y = 5 if (X < Y): Y = X + 2 elif (X > Y): X = Y % 2 else: X = X//Y print(X," ",Y)

4 6

5 8

4 7

5 7

4.What is the result of the following logical operation ?

10101010

AND 11110000

1001 0000

1010 0000

1100 0000

1010 1111

5. Which negative integer does the following two's complement binary notation represent

NOTE: Space between digits is for readability

110 101

-13

-12

None of the above

-18

6.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?

while n > 0 or 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

while n >= 0 and n >= 100:

generate an error message

7. When searching the following list in the sequential search algorithm which will be found most quickly

11 23 31 44 56 58 61 68 72 88 91 112 133 144 155

44

68

56

31

8. Convert the following binary representation to its equivalent base 10 notation

111.01

7 3/4

6 1/2

7 1/2

7 1/4

9.At most, how many entries in a list of 2000 names will be interrogated when using the binary search algorithm

12

11

10

13

10.

What is the result of the following logical operation ?

1010101

XOR 1101010

011 0111

110 1111

101 1011

011 1111

11.

Which of the following bit patterns represents the decimal value -22 in two's complement notation

NOTE: Space between digits is for readability

101 010

101 101

111 101

101 001

12.What integers are interrograted ( compared to ) in the binary search algorithm when searching for the integer 31 in the list

11 23 31 44 56 58 61 68 72 88 91 112 133 144 155

68 44 11 23

68 44 23 31

72 44 23 31

61 44 23 31

13. What bit pattern is represented by 36.130 in dotted decimal notation ?

00100110.10000110

00100100.10000110

00100110.10000100

00100100.10000010

14. Express the bit pattern 01010111.10001000 in dotted decimal notation

88.142

84.134

76.112

87.136

15. Convert the following base 10 value into binary representation

12 7/8

01101.101

01100.111

01101.011

01100.011

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!